libfdisk: fix script parser, add debug messages

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: add support for sfdisk scripts

New commands 'I' and 'O' allows to read and write sfdisk compatible
scripts by fdisk. It means that you can save your work (partition
table) and later use it (in fdisk, sfdisk or cfdisk) to create a new
partition table.

Signed-off-by: Karel Zak <kzak@redhat.com>
cfdisk: add support for sfdisk scripts

Signed-off-by: Karel Zak <kzak@redhat.com>
cfdisk: remove [Load] from menu

This functionality will be rarely used, so it does not make sense to
waste screen space with this menu item. It's enough to provide this
functionality in "Select label type" dialog (cfdisk --zero and then
'L' command).

Signed-off-by: Karel Zak <kzak@redhat.com>
cfdisk: cleanup menuitem draw functions

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: fix table_add_freespace(), add debug messages

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (dos) be sure that sorted EBR list is terminated

Signed-off-by: Karel Zak <kzak@redhat.com>
hwclock: improve wording and formatting of man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
libblkid: (nilfs) fix typo

Signed-off-by: Boris Egorov <egorov@linux.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: missing break in switch

Signed-off-by: Boris Egorov <egorov@linux.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: fix get_partition_unused_primary()

Was:
Mentioned function returns -1 if adding of primary partition is
impossible. Caller treats this value as size_t (res variable) and then
compares it for negative values, totally ignoring errors.

Becomes:
Now function takes address to variable and fills it with partition
number. Caller treats return value as int and use it appropriately.

[kzak@redhat.com: - don't mix return code and partno at all]

Signed-off-by: Boris Egorov <egorov@linux.com>
Signed-off-by: Karel Zak <kzak@redhat.com>