When editing a disk image, fdisk wants to ask the kernel to reread the
partition table which is useless and provokes an error, a wrong exit
code and some waiting. This annoys me as I can't check the return code
in my script and because I have to wait a few seconds each time.
This trivial patch makes it only do the ioctl on block devices.
It also simplifies code by dropping some workaround for kernel 1.2.x