From: Bertrand Jacquin <beber@meleeweb.net>
To: util-linux@vger.kernel.org
Subject: sfdisk 2.20.1 --no-reread do BLKRRPART
Date: Thu, 16 Feb 2012 21:16:18 +0100 [thread overview]
Message-ID: <20120216201617.GD7482@lemonhead.scabb> (raw)
[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]
Hi,
When creating partitions on a destination that is not a block device,
sfdisk do a BLKRRPART ioctl even when --no-reread option is used, but
looking at documentation --no-reread only apply to the beginning
process.
Would it be fine to extend that to the complete process ?
Bertrand
dd if=/dev/zero of=/tmp/disk.img bs=1024 count=4032
strace -fF -s 1024 -e trace=ioctl \
sfdisk --no-reread -C2 -H32 -S63 -q -f \
/tmp/disk.img << EOF
unit: sectors
part1 : start= 63, size= 3969, Id=83
part2 : start= 4032, size= 98784, Id=83
part3 : start= 102816, size= 22176, Id=83
part4 : start= 124992, size= 0, Id=83
EOF
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fff7b917ce0) = -1 ENOTTY (Inappropriate ioctl for device)
Warning: /tmp/disk.img is not a block device
ioctl(3, HDIO_GETGEO, 0x7fff7b917c10) = -1 ENOTTY (Inappropriate ioctl for device)
Disk /tmp/disk.img: cannot get geometry
ioctl(3, BLKGETSIZE64, 0x7fff7b917be0) = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(3, BLKGETSIZE, 0x7fff7b917b18) = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(3, FDGETPRM, 0x7fff7b917af0) = -1 ENOTTY (Inappropriate ioctl for device)
Disk /tmp/disk.img: 2 cylinders, 32 heads, 63 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature
/tmp/disk.img: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/tmp/disk.img1 63 4031 3969 83 Linux
/tmp/disk.img2 4032 102815 98784 83 Linux
/tmp/disk.img3 102816 124991 22176 83 Linux
/tmp/disk.img4 124992 124991 0 83 Linux
Successfully wrote the new partition table
Re-reading the partition table ...
ioctl(3, BLKRRPART, 0) = -1 ENOTTY (Inappropriate ioctl for device)
BLKRRPART: Inappropriate ioctl for device
--
Beber
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2012-02-16 20:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 20:16 Bertrand Jacquin [this message]
2013-05-20 11:15 ` sfdisk 2.20.1 --no-reread do BLKRRPART Karel Zak
2013-05-21 13:35 ` Bertrand Jacquin
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=20120216201617.GD7482@lemonhead.scabb \
--to=beber@meleeweb.net \
--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.