[BusyBox] [PATCH] Read-only option for losetup.c
Bastian Blank
waldi at debian.org
Sun Apr 10 16:24:52 UTC 2005
On Sun, Apr 10, 2005 at 09:33:50AM -0400, Rob Landley wrote:
> - while ((opt = getopt (argc, argv, "do:")) != -1)
> - switch (opt)
> - {
> + for(;;) {
> + switch (getopt(argc, argv, "do:r")) {
> case 'd':
> delete = 1;
> break;
> @@ -41,19 +40,26 @@
> case 'o':
> offset = bb_xparse_number (optarg, NULL);
> break;
> -
> +
> + case 'r':
> + readonly=1;
> + break;
> +
> + case -1:
> + goto done;
> +
> default:
> bb_show_usage();
> }
> -
> + }
> +done:
WAH. Don't use goto if not necesary. And no, it is not.
Bastian
--
Conquest is easy. Control is not.
-- Kirk, "Mirror, Mirror", stardate unknown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/busybox/attachments/20050410/63053b7b/attachment-0002.pgp
More information about the busybox
mailing list