public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Bernhard Voelker <mail@bernhard-voelker.de>,
	"util-linux@vger.kernel.org" <util-linux@vger.kernel.org>,
	Davidlohr Bueso <dave@gnu.org>
Subject: Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
Date: Tue, 17 Apr 2012 16:48:01 +0200	[thread overview]
Message-ID: <20120417144801.GA2391@x2.net.home> (raw)
In-Reply-To: <4F8D7EEF.8060601@draigBrady.com>

On Tue, Apr 17, 2012 at 03:32:15PM +0100, Pádraig Brady wrote:
> On 04/17/2012 03:14 PM, Bernhard Voelker wrote:
> > On 04/17/2012 03:56 PM, Pádraig Brady wrote:
> >> On 04/17/2012 09:42 AM, Bernhard Voelker wrote:
> >>> Karel Zak wrote:
> >>>
> >>>> On Mon, Apr 16, 2012 at 12:22:12PM +0200, Voelker, Bernhard wrote:
> >>>>> Maybe this is better?
> >>>>>
> >>>>> -	printf(_("Units = mebibytes of 1048576 bytes, blocks of 1024 bytes"
> >>>>> +	printf(_("Units = 1MiB, blocks of 1024*1024 bytes"
> >>
> >> Blocks are 1024 bytes in this mode, as confirmed with:
> >> sfdisk -uM -l /dev/sda
> > 
> > I don't understand. What's wrong?
> > 
> > $ wc -c </dev/sda1
> > 12582912000
> > 
> > $ echo '12582912000 / (1024*1024)' | bc
> > 12000
> > 
> > $ ./sfdisk -uM -l /dev/sda | egrep 'sda1|MiB'
> > Units = 1MiB, blocks of 1024*1024 bytes, counting from 0
> >    Device Boot Start   End    MiB    #blocks   Id  System
> > /dev/sda1   *     1  12000  12000   12288000   83  Linux
> 
> Well I thought the "blocks of" was referring to the blocks column,
> rather than the units?
> 
> $ echo $((12582912000 / 1024))
> 12288000

 yep, my +1 was about s/mebibytes/MiB/, I have overlooked the
 1024*1024 math in the patch. Pádraig is right, (s)fdisk uses 1024
 byte blocks in output (probably too keep things more confusing ;-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17  8:42 [PATCH] sfdisk (out_partition_header): improve F_MEGABYTE header [WAS: [PATCH 5/8] sfdisk: fix silly mbyte typo] Bernhard Voelker
2012-04-17 13:56 ` [PATCH 5/8] sfdisk: fix silly mbyte typo Pádraig Brady
2012-04-17 14:14   ` Bernhard Voelker
2012-04-17 14:32     ` Pádraig Brady
2012-04-17 14:48       ` Karel Zak [this message]
2012-04-17 14:59         ` Bernhard Voelker
2012-04-18  6:50           ` Bernhard Voelker
2012-04-18 10:46             ` Pádraig Brady
2012-04-23 10:48             ` Karel Zak
  -- strict thread matches above, loose matches on Subject: below --
2012-04-16  9:44 Davidlohr Bueso
2012-04-16  9:53 ` Voelker, Bernhard
2012-04-16 10:13   ` Davidlohr Bueso
2012-04-16 10:22     ` Voelker, Bernhard
2012-04-16 10:27       ` 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=20120417144801.GA2391@x2.net.home \
    --to=kzak@redhat.com \
    --cc=P@draigBrady.com \
    --cc=dave@gnu.org \
    --cc=mail@bernhard-voelker.de \
    --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