sfdisk: use fdisk_set_partition_type()

This is more simple than the generic fdisk_set_partition() API.

Signed-off-by: Karel Zak <kzak@redhat.com>
linfdisk: cleanup fsync usage

 * always use fsync() if the device open read-write
 * use sync() on demand

Signed-off-by: Karel Zak <kzak@redhat.com>
sfdisk: cleanup sync() usage, fix --activate

 * use sync() only if we change disk layout
 * don't use sync() when we change details (like partition type)

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) check string_to_guid()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: use new set_part API in fdisk_set_partition_type()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (bsd) add set_part() API

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (sgi) add set_part() API

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: remove old label drives' API for parttypes

Signed-off-by: Karel Zak <kzak@redhat.com>