diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-29 21:47:11 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-29 21:47:11 +0000 |
commit | ce828071fb049a45dd1aaf89fe1e40b896b8dc6d (patch) | |
tree | 40c9022518937b186c9b2fa3820aea7c12f03ef2 /util-linux | |
parent | 2fc3897df50b4afafd49ebe58c4ba25eddf2a22b (diff) | |
download | busybox-w32-ce828071fb049a45dd1aaf89fe1e40b896b8dc6d.tar.gz busybox-w32-ce828071fb049a45dd1aaf89fe1e40b896b8dc6d.tar.bz2 busybox-w32-ce828071fb049a45dd1aaf89fe1e40b896b8dc6d.zip |
losetup: use /dev/loopN or /dev/loop/N according to CONFIG_FEATURE_DEVFS=n/y
git-svn-id: svn://busybox.net/trunk/busybox@16264 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/losetup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/losetup.c b/util-linux/losetup.c index 6b9a810f2..54a160119 100644 --- a/util-linux/losetup.c +++ b/util-linux/losetup.c | |||
@@ -48,11 +48,11 @@ int losetup_main(int argc, char **argv) | |||
48 | printf("%s: %s\n", argv[0], s); | 48 | printf("%s: %s\n", argv[0], s); |
49 | if (ENABLE_FEATURE_CLEAN_UP) free(s); | 49 | if (ENABLE_FEATURE_CLEAN_UP) free(s); |
50 | } else { | 50 | } else { |
51 | char dev[11] = "/dev/loop0"; | 51 | char dev[sizeof(LOOP_NAME"0")] = LOOP_NAME"0"; |
52 | char c; | 52 | char c; |
53 | for (c = '0'; c <= '9'; ++c) { | 53 | for (c = '0'; c <= '9'; ++c) { |
54 | char *s; | 54 | char *s; |
55 | dev[9] = c; | 55 | dev[sizeof(LOOP_NAME"0")-2] = c; |
56 | s = query_loop(dev); | 56 | s = query_loop(dev); |
57 | if (s) { | 57 | if (s) { |
58 | printf("%s: %s\n", dev, s); | 58 | printf("%s: %s\n", dev, s); |