From f39f307ded336dddb9a4767b1128b82471446412 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 11 Mar 2000 01:11:06 +0000 Subject: no_comment --- perl-install/c/stuff.xs.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'perl-install/c') 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 ' -- cgit v1.2.1