From: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
To: util-linux <util-linux@vger.kernel.org>
Subject: Re: fdisk: off-by-one issue in (n)new command
Date: Mon, 16 Jan 2012 19:30:42 -0300 [thread overview]
Message-ID: <4F14A512.2030904@yahoo.com.ar> (raw)
In-Reply-To: <4F149CA0.6040100@yahoo.com.ar>
On 01/16/2012 06:54 PM, Gerardo Exequiel Pozzi wrote:
> On 01/16/2012 06:38 PM, Francesco Cosoleto wrote:
>> 2012/1/12 Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar>:
>>> I think I found two related bugs, steps to reproduce will be more
>>> clear than
>>> a description:
>>> It is present in stable 2.20.1 and using latest git snapshot, and
>>> using any
>>> device/file as disk, using here a loop dev with a backing file of
>>> 256MiB
>>> just for example.
>> Fixed. Thank you for the report.
>>
>> http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=commit;h=0c381880282b9365aaf9e8457c69750c12c4d9b2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe util-linux" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
> Thank you!
>
> I will test it in few hours ;)
>
Works fine (default value after out-of-range) :)
Still remains the other bug that does not allow to specify "last sector"
that just fits the size in +sectors/+N(K|M|G).
Example:
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-524287, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-524287, default 524287): +255M
Value out of range.
Last sector, +sectors or +size{K,M,G} (2048-524287, default 524287):
+261120K
Value out of range.
Last sector, +sectors or +size{K,M,G} (2048-524287, default 524287): +522240
Value out of range.
Last sector, +sectors or +size{K,M,G} (2048-524287, default 524287): +522239
Partition 1 of type Linux and of size 255 MiB is set
Command (m for help): p
Disk /dev/vdb: 268 MB, 268435456 bytes
16 heads, 63 sectors/track, 520 cylinders, total 524288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbfd7539b
Device Boot Start End Blocks Id System
/dev/vdb1 2048 524287 261120 83 Linux
--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1
next prev parent reply other threads:[~2012-01-16 22:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F0E167A.9090205@yahoo.com.ar>
[not found] ` <CAMFXF50uHCU4yhwe3byAsTKvPpi8F63mR9O4TfKhuANiEL_v0Q@mail.gmail.com>
2012-01-16 21:54 ` fdisk: off-by-one issue in (n)new command Gerardo Exequiel Pozzi
2012-01-16 22:30 ` Gerardo Exequiel Pozzi [this message]
2012-01-17 10:07 ` Karel Zak
2012-01-17 14:55 ` Gerardo Exequiel Pozzi
2012-01-20 14:21 ` Francesco Cosoleto
2012-01-22 1:37 ` Gerardo Exequiel Pozzi
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=4F14A512.2030904@yahoo.com.ar \
--to=vmlinuz386@yahoo.com.ar \
--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 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.