Bug#431954: Sfdisk calls BLKRRPART on file that is not a block device

2012-02-16 Thread Bertrand Jacquin
Hi,

Actualy, it does using util-linux 2.20.1:

  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 BootStart   End   #sectors  Id  System
/tmp/disk.img163  4031   3969  83  Linux
/tmp/disk.img2  4032102815  98784  83  Linux
/tmp/disk.img3102816124991  22176  83  Linux
/tmp/disk.img4124992124991  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


signature.asc
Description: Digital signature


Bug#431954: Sfdisk calls BLKRRPART on file that is not a block device

2011-08-21 Thread Eero Tamminen
Use --no-reread if you want sfdisk to avoid the BLKRRPART.

- Eero



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#431954: Sfdisk calls BLKRRPART on file that is not a block device

2007-07-06 Thread Andrew Buckeridge
Package: util-linux
Version: 2.12r-19
Severity: whishlist

Having -C -H -S parameters and working from the command line with
sfdisk -d style here documents makes sfdisk suited to making disc
images for virtual machines or automatic installation.

It issues a warning about file not being a block device, but then does
BLKRRPART ioctl anyway.  Be tidier if it did not do BLKRRPART ioctl.

Warning: sfdisk.img is not a block device
Disk sfdisk.img: cannot get geometry

Disk sfdisk.img: 1024 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 sfdisk.img: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = sectors of 512 bytes, counting from 0

   Device BootStart   End   #sectors  Id  System
sfdisk.img1   *63  16450559   16450497   c  W95 FAT32 (LBA)
sfdisk.img2 0 -  0   0  Empty
sfdisk.img3 0 -  0   0  Empty
sfdisk.img4 0 -  0   0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Inappropriate ioctl for device


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]