diff options
author | Karel Zak | 2013-01-21 12:44:58 +0100 |
---|---|---|
committer | Karel Zak | 2013-03-11 12:47:31 +0100 |
commit | 62a7b31332f75a0dd24eeaf0952084d6bc4a4895 (patch) | |
tree | 00588526babbf9793e720ab675cfab76b0c5f6e5 /fdisks/fdiskdoslabel.h | |
parent | fdisk: (dos) move 'toggle active' code to fdiskdoslabe.c (diff) | |
download | kernel-qcow2-util-linux-62a7b31332f75a0dd24eeaf0952084d6bc4a4895.tar.gz kernel-qcow2-util-linux-62a7b31332f75a0dd24eeaf0952084d6bc4a4895.tar.xz kernel-qcow2-util-linux-62a7b31332f75a0dd24eeaf0952084d6bc4a4895.zip |
fdisk: (dos) move dos specific code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdiskdoslabel.h')
-rw-r--r-- | fdisks/fdiskdoslabel.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fdisks/fdiskdoslabel.h b/fdisks/fdiskdoslabel.h index 80f5dbba6..64d06b818 100644 --- a/fdisks/fdiskdoslabel.h +++ b/fdisks/fdiskdoslabel.h @@ -36,6 +36,13 @@ static inline sector_t get_partition_start(struct pte *pe) return pe->offset + get_start_sect(pe->part_table); } +static inline int is_cleared_partition(struct partition *p) +{ + return !(!p || p->boot_ind || p->head || p->sector || p->cyl || + p->sys_ind || p->end_head || p->end_sector || p->end_cyl || + get_start_sect(p) || get_nr_sects(p)); +} + extern void dos_print_mbr_id(struct fdisk_context *cxt); extern void dos_set_mbr_id(struct fdisk_context *cxt); extern void dos_init(struct fdisk_context *cxt); |