diff options
author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-22 23:17:18 +0000 |
---|---|---|
committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-22 23:17:18 +0000 |
commit | fe20262768f8b05e47a741c116e612cce816d879 (patch) | |
tree | a9639ce9f5b572a061e9cbef5638ce9697680ce4 /libbb | |
parent | db2c3e639859993012549cf47363359bd517ce78 (diff) | |
download | busybox-w32-fe20262768f8b05e47a741c116e612cce816d879.tar.gz busybox-w32-fe20262768f8b05e47a741c116e612cce816d879.tar.bz2 busybox-w32-fe20262768f8b05e47a741c116e612cce816d879.zip |
Close bug 644: loop incrementing twice, skipping ever other device.
git-svn-id: svn://busybox.net/trunk/busybox@13496 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/loop.c b/libbb/loop.c index 85aa37236..6c3144a77 100644 --- a/libbb/loop.c +++ b/libbb/loop.c | |||
@@ -98,7 +98,7 @@ int set_loop(char **device, const char *file, int offset) | |||
98 | /* Find a loop device. */ | 98 | /* Find a loop device. */ |
99 | try=*device ? : dev; | 99 | try=*device ? : dev; |
100 | for(i=0;rc;i++) { | 100 | for(i=0;rc;i++) { |
101 | sprintf(dev, LOOP_FORMAT, i++); | 101 | sprintf(dev, LOOP_FORMAT, i); |
102 | /* Ran out of block devices, return failure. */ | 102 | /* Ran out of block devices, return failure. */ |
103 | if(stat(try, &statbuf) || !S_ISBLK(statbuf.st_mode)) { | 103 | if(stat(try, &statbuf) || !S_ISBLK(statbuf.st_mode)) { |
104 | rc=ENOENT; | 104 | rc=ENOENT; |