sbin/fdisk: cleanups
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Thu, 24 Dec 2015 13:21:52 +0000 (19:21 +0600)
committerSascha Wildner <saw@online.de>
Thu, 24 Dec 2015 17:14:00 +0000 (18:14 +0100)
commit6a0b5de07929665f19d7f92b653579cfb1fdcf9a
tree43281fde3d69ec09011dbe9a3b82450a9da82eeb
parentdf183f17b1467b0672c6c7e0ab6f0c8cb895edc6
sbin/fdisk: cleanups

This patch provides set of cleanups for the sbin/fdisk util.

1. MBRSIGOFF macro removed. Use the DOSMAGICOFFSET macro instead
which is already defined in the <sys/diskmbr.h>.

2. Global variable iotest removed. It was used in the write_sr0()
function before. We checked this variable and it it was set we
just printed information about zero sector and exited from the
write_sr0(). Actually, this variable wasn't set never and never
used anywhere. For this point we already have the `-t` flag
which prevents writing of sector 0.

3. Unused macros removed.

4. Unused functions removed.

5. MAX_SECTORS_PER_TRACK and MIN_SECTORS_PER_TRACK macros are added.

6. Fixed order of DIOCWLABEL ioctl in the write_sr0().

7. Indentation fixed.
sbin/fdisk/fdisk.c