public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Uzel <petr.uzel@suse.cz>
To: Davidlohr Bueso <dave@gnu.org>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 1/8] fdisk: make CHS user values more robust
Date: Tue, 17 Apr 2012 20:19:03 +0200	[thread overview]
Message-ID: <20120417181903.GA8666@skipper.site> (raw)
In-Reply-To: <1334569473.2552.10.camel@offbook>

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

On Mon, Apr 16, 2012 at 11:44:33AM +0200, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <dave@gnu.org>
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> ---
>  fdisk/cfdisk.c |    6 +++---
>  fdisk/fdisk.c  |    8 ++++----
>  fdisk/sfdisk.c |    9 +++++----
>  3 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c
> index a6cf01e..33624bb 100644
> --- a/fdisk/cfdisk.c
> +++ b/fdisk/cfdisk.c
> @@ -2776,7 +2776,7 @@ main(int argc, char **argv)
>  	    arrow_cursor = TRUE;
>  	    break;
>  	case 'c':
> -	    user_cylinders = cylinders = atoll(optarg);
> +		user_cylinders = cylinders = strtoll_or_err(optarg, _("cannot parse amount of cylinders"));

s/amount/number ?

dtto below

>  	    if (cylinders <= 0) {
>  		fprintf(stderr, "%s: %s\n", argv[0], _("Illegal cylinders value"));
>  		exit(1);
> @@ -2786,14 +2786,14 @@ main(int argc, char **argv)
>  	    use_partition_table_geometry = TRUE;
>  	    break;
>  	case 'h':
> -	    user_heads = heads = atoi(optarg);
> +	    user_heads = heads = strtol_or_err(optarg, _("cannot parse amount of heads"));

[SNIP]

--
Petr Uzel
IRC: ptr_uzl @ freenode

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-04-17 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16  9:44 [PATCH 1/8] fdisk: make CHS user values more robust Davidlohr Bueso
2012-04-17 18:19 ` Petr Uzel [this message]
2012-04-23 10:13   ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120417181903.GA8666@skipper.site \
    --to=petr.uzel@suse.cz \
    --cc=dave@gnu.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox