Re: [PATCH 1/3] swapon: check numeric user inputs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 02, 2012 at 09:15:16PM +0100, Sami Kerola wrote:
>  sys-utils/swapon.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

 Applied, thanks.

> diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
> index c9cabc1..3fe6592 100644
> --- a/sys-utils/swapon.c
> +++ b/sys-utils/swapon.c
> @@ -730,7 +730,8 @@ int main(int argc, char *argv[])
>  			usage(stdout);
>  			break;
>  		case 'p':		/* priority */
> -			priority = atoi(optarg);
> +			priority = strtos16_or_err(optarg,
> +					   _("failed to parse argument"));

 too generic, "failed to parse priority" seems better.

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux