* [PATCH] sfdisk (out_partition_header): improve F_MEGABYTE header [WAS: [PATCH 5/8] sfdisk: fix silly mbyte typo]
@ 2012-04-17 8:42 Bernhard Voelker
2012-04-17 13:56 ` [PATCH 5/8] sfdisk: fix silly mbyte typo Pádraig Brady
0 siblings, 1 reply; 9+ messages in thread
From: Bernhard Voelker @ 2012-04-17 8:42 UTC (permalink / raw)
To: util-linux, Karel Zak, Davidlohr Bueso
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"
>
> +1
>From d54cd212b7ac410669ed61e75717acdb67de2fa3 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Tue, 17 Apr 2012 10:37:21 +0200
Subject: [PATCH] sfdisk (out_partition_header): improve F_MEGABYTE header
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
---
fdisk/sfdisk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 95e5828..a2684fb 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -929,7 +929,7 @@ out_partition_header(char *dev, int format, struct geometry G) {
printf(_(" Device Boot Start End #blocks Id System\n"));
break;
case F_MEGABYTE:
- printf(_("Units = mebibytes of 1048576 bytes, blocks of 1024 bytes"
+ printf(_("Units = 1MiB, blocks of 1024*1024 bytes"
", counting from %d\n\n"), increment);
printf(_(" Device Boot Start End MiB #blocks Id System\n"));
break;
--
1.7.7
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
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 ` Pádraig Brady
2012-04-17 14:14 ` Bernhard Voelker
0 siblings, 1 reply; 9+ messages in thread
From: Pádraig Brady @ 2012-04-17 13:56 UTC (permalink / raw)
To: Bernhard Voelker; +Cc: util-linux, Karel Zak, Davidlohr Bueso
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
cheers,
Pádraig.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
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
0 siblings, 1 reply; 9+ messages in thread
From: Bernhard Voelker @ 2012-04-17 14:14 UTC (permalink / raw)
To: Pádraig Brady; +Cc: util-linux, Karel Zak, Davidlohr Bueso
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
Have a nice day,
Berny
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
2012-04-17 14:14 ` Bernhard Voelker
@ 2012-04-17 14:32 ` Pádraig Brady
2012-04-17 14:48 ` Karel Zak
0 siblings, 1 reply; 9+ messages in thread
From: Pádraig Brady @ 2012-04-17 14:32 UTC (permalink / raw)
To: Bernhard Voelker; +Cc: util-linux, Karel Zak, Davidlohr Bueso
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
cheers,
Pádraig.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
2012-04-17 14:32 ` Pádraig Brady
@ 2012-04-17 14:48 ` Karel Zak
2012-04-17 14:59 ` Bernhard Voelker
0 siblings, 1 reply; 9+ messages in thread
From: Karel Zak @ 2012-04-17 14:48 UTC (permalink / raw)
To: Pádraig Brady; +Cc: Bernhard Voelker, util-linux, Davidlohr Bueso
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
2012-04-17 14:48 ` Karel Zak
@ 2012-04-17 14:59 ` Bernhard Voelker
2012-04-18 6:50 ` Bernhard Voelker
0 siblings, 1 reply; 9+ messages in thread
From: Bernhard Voelker @ 2012-04-17 14:59 UTC (permalink / raw)
To: Karel Zak; +Cc: Pádraig Brady, util-linux, Davidlohr Bueso
On 04/17/2012 04:48 PM, Karel Zak wrote:
> 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
so KiB would be right?
> (probably too keep things more confusing ;-)
mission accomplished ...
Bye,
Berny
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
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
0 siblings, 2 replies; 9+ messages in thread
From: Bernhard Voelker @ 2012-04-18 6:50 UTC (permalink / raw)
To: Karel Zak; +Cc: Pádraig Brady, util-linux, Davidlohr Bueso
On 04/17/2012 04:59 PM, Bernhard Voelker wrote:
>
>
> On 04/17/2012 04:48 PM, Karel Zak wrote:
>> 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
>
> so KiB would be right?
>
>> (probably too keep things more confusing ;-)
>
> mission accomplished ...
>
> Bye,
> Berny
>
ah, that part refers to the "#blocks" column!
The problem starts with the "=" after "Units". A colon would
maybe be more appropriate: then we could use the equal sign
like in the following.
What do you think?
Have a nice day,
Berny
>From 1c59d9ca4d18d795de354003d0059dc593c6a99b Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Wed, 18 Apr 2012 08:47:29 +0200
Subject: [PATCH] sfdisk (out_partition_header): improve F_MEGABYTE header
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
---
fdisk/sfdisk.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 95e5828..c14d127 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -912,24 +912,24 @@ out_partition_header(char *dev, int format, struct geometry G) {
G.cylindersize ? _("cylinders") : _("sectors"));
case F_CYLINDER:
if (G.cylindersize) {
- printf(_("Units = cylinders of %lu bytes, blocks of 1024 bytes"
+ printf(_("Units: cylinders of %lu bytes, blocks of 1024 bytes"
", counting from %d\n\n"), G.cylindersize << 9, increment);
printf(_(" Device Boot Start End #cyls #blocks Id System\n"));
break;
}
/* fall through */
case F_SECTOR:
- printf(_("Units = sectors of 512 bytes, counting from %d\n\n"),
+ printf(_("Units: sectors of 512 bytes, counting from %d\n\n"),
increment);
printf(_(" Device Boot Start End #sectors Id System\n"));
break;
case F_BLOCK:
- printf(_("Units = blocks of 1024 bytes, counting from %d\n\n"),
+ printf(_("Units: blocks of 1024 bytes, counting from %d\n\n"),
increment);
printf(_(" Device Boot Start End #blocks Id System\n"));
break;
case F_MEGABYTE:
- printf(_("Units = mebibytes of 1048576 bytes, blocks of 1024 bytes"
+ printf(_("Units: 1MiB = 1024*1024 bytes, blocks of 1024 bytes"
", counting from %d\n\n"), increment);
printf(_(" Device Boot Start End MiB #blocks Id System\n"));
break;
--
1.7.7
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
2012-04-18 6:50 ` Bernhard Voelker
@ 2012-04-18 10:46 ` Pádraig Brady
2012-04-23 10:48 ` Karel Zak
1 sibling, 0 replies; 9+ messages in thread
From: Pádraig Brady @ 2012-04-18 10:46 UTC (permalink / raw)
To: Bernhard Voelker; +Cc: Karel Zak, util-linux, Davidlohr Bueso
On 04/18/2012 07:50 AM, Bernhard Voelker wrote:
>
>
> On 04/17/2012 04:59 PM, Bernhard Voelker wrote:
>>
>>
>> On 04/17/2012 04:48 PM, Karel Zak wrote:
>>> 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
>>
>> so KiB would be right?
>>
>>> (probably too keep things more confusing ;-)
>>
>> mission accomplished ...
>>
>> Bye,
>> Berny
>>
>
> ah, that part refers to the "#blocks" column!
>
> The problem starts with the "=" after "Units". A colon would
> maybe be more appropriate: then we could use the equal sign
> like in the following.
>
> What do you think?
>
> Have a nice day,
> Berny
>
>
>>From 1c59d9ca4d18d795de354003d0059dc593c6a99b Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Wed, 18 Apr 2012 08:47:29 +0200
> Subject: [PATCH] sfdisk (out_partition_header): improve F_MEGABYTE header
>
> Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
> ---
> fdisk/sfdisk.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
> index 95e5828..c14d127 100644
> --- a/fdisk/sfdisk.c
> +++ b/fdisk/sfdisk.c
> @@ -912,24 +912,24 @@ out_partition_header(char *dev, int format, struct geometry G) {
> G.cylindersize ? _("cylinders") : _("sectors"));
> case F_CYLINDER:
> if (G.cylindersize) {
> - printf(_("Units = cylinders of %lu bytes, blocks of 1024 bytes"
> + printf(_("Units: cylinders of %lu bytes, blocks of 1024 bytes"
> ", counting from %d\n\n"), G.cylindersize << 9, increment);
> printf(_(" Device Boot Start End #cyls #blocks Id System\n"));
> break;
> }
> /* fall through */
> case F_SECTOR:
> - printf(_("Units = sectors of 512 bytes, counting from %d\n\n"),
> + printf(_("Units: sectors of 512 bytes, counting from %d\n\n"),
> increment);
> printf(_(" Device Boot Start End #sectors Id System\n"));
> break;
> case F_BLOCK:
> - printf(_("Units = blocks of 1024 bytes, counting from %d\n\n"),
> + printf(_("Units: blocks of 1024 bytes, counting from %d\n\n"),
> increment);
> printf(_(" Device Boot Start End #blocks Id System\n"));
> break;
> case F_MEGABYTE:
> - printf(_("Units = mebibytes of 1048576 bytes, blocks of 1024 bytes"
> + printf(_("Units: 1MiB = 1024*1024 bytes, blocks of 1024 bytes"
> ", counting from %d\n\n"), increment);
> printf(_(" Device Boot Start End MiB #blocks Id System\n"));
> break;
+1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 5/8] sfdisk: fix silly mbyte typo
2012-04-18 6:50 ` Bernhard Voelker
2012-04-18 10:46 ` Pádraig Brady
@ 2012-04-23 10:48 ` Karel Zak
1 sibling, 0 replies; 9+ messages in thread
From: Karel Zak @ 2012-04-23 10:48 UTC (permalink / raw)
To: Bernhard Voelker; +Cc: Pádraig Brady, util-linux, Davidlohr Bueso
On Wed, Apr 18, 2012 at 08:50:17AM +0200, Bernhard Voelker wrote:
> fdisk/sfdisk.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-04-23 10:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.