hush: rename o_quoted to has_quoted_part; small code shrink
[oweals/busybox.git] / util-linux / losetup.c
index e44773a074093935b45ea5075e02230f70f17783..776f784f5b1a51b7b34789fe0f68525af81dea2d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Copyright (C) 2002  Matt Kraai.
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 
 #include "libbb.h"
@@ -23,7 +23,7 @@ int losetup_main(int argc UNUSED_PARAM, char **argv)
        };
 
        /* max 2 args, all opts are mutually exclusive */
-       opt_complementary = "?2:d--of:o--df:f-do";
+       opt_complementary = "?2:d--of:o--df:f--do";
        opt = getopt32(argv, "do:f", &opt_o);
        argv += optind;
 
@@ -65,9 +65,9 @@ int losetup_main(int argc UNUSED_PARAM, char **argv)
        n = 0;
        while (1) {
                char *s;
-               char dev[sizeof(LOOP_NAME) + sizeof(int)*3];
+               char dev[LOOP_NAMESIZE];
 
-               sprintf(dev, LOOP_NAME"%u", n);
+               sprintf(dev, LOOP_FORMAT, n);
                s = query_loop(dev);
                n++;
                if (!s) {