[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] [PATCH] readlink -f
From:       "Vladimir N. Oleynik" <dzo () simtreas ! ru>
Date:       2004-10-28 15:29:00
Message-ID: 4181103C.7010507 () simtreas ! ru
[Download RAW message or body]

Colin,

if use libbb/have bb_getopt_ulflags() this patch is simplyfied

> +	unsigned char follow_flag = 0;

+	int follow_flag = bb_getopt_ulflags(argc, argv, readlink_options);

This code a block do not require now:

> +	int opt;
> +
> +	while ((opt = getopt(argc, argv, readlink_options)) != -1) {
> +		switch (opt) {
> +#ifdef CONFIG_FEATURE_READLINK_FOLLOW
> +			case 'f':
> +				follow_flag = 1;
> +				break;
> +#endif
> +			default:
> +				bb_show_usage();
> +		}
> +	}


--w
vodz


_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic