aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-07-30 08:55:59 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-07-30 08:55:59 +0000
commit8faebcf35e1e4e01ba0a05f238eb13d61c073d76 (patch)
tree33c75866a44a1c0efbcbcab745d28896d2775c00 /util-linux
parent3e7760071569013e31483e412f93453f6024ac16 (diff)
downloadbusybox-w32-8faebcf35e1e4e01ba0a05f238eb13d61c073d76.tar.gz
busybox-w32-8faebcf35e1e4e01ba0a05f238eb13d61c073d76.tar.bz2
busybox-w32-8faebcf35e1e4e01ba0a05f238eb13d61c073d76.zip
Lars Ekman writes:
When using "losetup" the device is always setup as Read-Only. (I have only tested with the -o flag, but looking at the code the problem seems general) The problem is the "opt" variable in "losetup.c" that is reused in the "set_loop()" call. Clear it before the call and everything is OK; opt = 0; /* <-------- added line */ if (delete) return del_loop (argv[optind]) ? EXIT_SUCCESS : EXIT_FAILURE; else return set_loop (argv[optind], argv[optind + 1], offset, &opt) ? EXIT_FAILURE : EXIT_SUCCESS; } Best Regards, Lars Ekman git-svn-id: svn://busybox.net/trunk/busybox@7142 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/losetup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index e2ea538d5..c94456522 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -50,6 +50,7 @@ losetup_main (int argc, char **argv)
50 || (!delete && optind + 2 != argc)) 50 || (!delete && optind + 2 != argc))
51 bb_show_usage(); 51 bb_show_usage();
52 52
53 opt = 0;
53 if (delete) 54 if (delete)
54 return del_loop (argv[optind]) ? EXIT_SUCCESS : EXIT_FAILURE; 55 return del_loop (argv[optind]) ? EXIT_SUCCESS : EXIT_FAILURE;
55 else 56 else