Displaying 4 results from an estimated 4 matches for "del_loop".
Did you mean:
delay_loop
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...0, sizeof(loopinfo));
+ }
+ memset(&loopinfo64, 0, sizeof(loopinfo64));
+
+ if (i) {
+ ioctl (fd, LOOP_CLR_FD, 0);
+ close (fd);
+ return 1;
+ }
+ close (fd);
+
+ if (verbose > 1)
+ printf("set_loop(%s,%s,%llu): success\n",
+ device, file, offset);
+ return 0;
+}
+
+int del_loop (const char *device)
+{
+ int fd;
+
+ if ((fd = open (device, O_RDONLY)) < 0) {
+ int errsv = errno;
+ fprintf(stderr, "loop: can't delete device %s: %s\n",
+ device, strerror (errsv));
+ return 1;
+ }
+ if (ioctl (fd, LOOP_CLR_FD, 0) < 0) {
+ perror ("ioctl: LOOP_CLR...
2011 Jul 05
0
[PATCH] losetup: use stdout and return 0 for -h
...and useful treshold. (:
usr/utils/losetup.c | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/usr/utils/losetup.c b/usr/utils/losetup.c
index 59030d7..9deacd4 100644
--- a/usr/utils/losetup.c
+++ b/usr/utils/losetup.c
@@ -353,14 +353,16 @@ int del_loop (const char *device)
int verbose = 0;
char *progname;
-static void usage(void) {
- fprintf(stderr, "usage:\n\
+static void usage(FILE *f)
+{
+ fprintf(f, "usage:\n\
%s loop_device # give info\n\
%s -d loop_device...
2010 Nov 20
1
[PATCH 1/2] cat cleanup ugly ifdefery
no point in carrying those ifdefs along,
just cleanup the code that seems either BSD specific or
can't work on klibc.
Signed-off-by: maximilian attems <max at stro.at>
---
usr/utils/cat.c | 22 +---------------------
1 files changed, 1 insertions(+), 21 deletions(-)
diff --git a/usr/utils/cat.c b/usr/utils/cat.c
index 1108d2e..7465148 100644
--- a/usr/utils/cat.c
+++
2010 Nov 20
3
[PATCH 1/4] utils: cleanup unused includes
...ndex 1a47fa9..59030d7 100644
--- a/usr/utils/losetup.c
+++ b/usr/utils/losetup.c
@@ -17,6 +17,7 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/sysmacros.h>
+#include <stdarg.h>
#include <string.h>
#include "loop.h"
@@ -349,9 +350,6 @@ int del_loop (const char *device)
}
-#include <getopt.h>
-#include <stdarg.h>
-
int verbose = 0;
char *progname;
diff --git a/usr/utils/mkfifo.c b/usr/utils/mkfifo.c
index f2ac35f..5a758b2 100644
--- a/usr/utils/mkfifo.c
+++ b/usr/utils/mkfifo.c
@@ -1,6 +1,5 @@
#include <sys/stat.h>...