fdisk against my USB flash drive crashes with divide by zero. It turns
out that get_params() starts with some default values (since there is
no disklabel) and then runs some ioctls: DIOCGFWSECTORS and DIOCGFWHEADS.
The problem is that fdisk checks the error from that ioctl and then
happily uses
In message [EMAIL PROTECTED], Nate Lawson wri
tes:
fdisk against my USB flash drive crashes with divide by zero. It turns
out that get_params() starts with some default values (since there is
no disklabel) and then runs some ioctls: DIOCGFWSECTORS and DIOCGFWHEADS.
The problem is that fdisk
On Tue, 15 Oct 2002, Poul-Henning Kamp wrote:
In message [EMAIL PROTECTED], Nate Lawson wri
tes:
fdisk against my USB flash drive crashes with divide by zero. It turns
out that get_params() starts with some default values (since there is
no disklabel) and then runs some ioctls:
In message [EMAIL PROTECTED], Nate Lawson wri
tes:
I could agree to make g_dev_ioctl fail the ioctl with some errno
if they came back as zero, but not substituting another value.
The attached patch makes everything work fine for my drive (64 MB USB
flash).
Apart from the choice of EINVAL,