diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-03-11 01:11:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-03-11 01:11:06 +0000 |
commit | f39f307ded336dddb9a4767b1128b82471446412 (patch) | |
tree | 1b32019b5547e9706346c48fb34f8dfa062af865 /perl-install/c | |
parent | 39b16a6249eb865a2319a8e3cb1e4270e6fec539 (diff) | |
download | drakx-backup-do-not-use-f39f307ded336dddb9a4767b1128b82471446412.tar drakx-backup-do-not-use-f39f307ded336dddb9a4767b1128b82471446412.tar.gz drakx-backup-do-not-use-f39f307ded336dddb9a4767b1128b82471446412.tar.bz2 drakx-backup-do-not-use-f39f307ded336dddb9a4767b1128b82471446412.tar.xz drakx-backup-do-not-use-f39f307ded336dddb9a4767b1128b82471446412.zip |
no_comment
Diffstat (limited to 'perl-install/c')
-rw-r--r-- | perl-install/c/stuff.xs.pm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index cdaa2d292..d8395dc66 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -255,7 +255,7 @@ set_loop(dev_fd, file) if (file_fd < 0) return; - memset(&loopinfo, 0, sizeof (loopinfo)); + memset(&loopinfo, 0, sizeof(loopinfo)); strncpy(loopinfo.lo_name, file, LO_NAME_SIZE); loopinfo.lo_name[LO_NAME_SIZE - 1] = 0; @@ -269,6 +269,22 @@ set_loop(dev_fd, file) } OUTPUT: RETVAL + +int +del_loop(device) + char *device + CODE: + RETVAL = 0; +{ + int fd; + if ((fd = open(device, O_RDONLY)) < 0) return; + if (ioctl(fd, LOOP_CLR_FD, 0) < 0) return; + close(fd); + RETVAL = 1; +} + OUTPUT: + RETVAL + '; $ENV{C_RPM} and print ' |