summaryrefslogtreecommitdiffstats
path: root/fdisks
diff options
context:
space:
mode:
authorKarel Zak2013-01-21 12:44:58 +0100
committerKarel Zak2013-03-11 12:47:31 +0100
commit62a7b31332f75a0dd24eeaf0952084d6bc4a4895 (patch)
tree00588526babbf9793e720ab675cfab76b0c5f6e5 /fdisks
parentfdisk: (dos) move 'toggle active' code to fdiskdoslabe.c (diff)
downloadkernel-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')
-rw-r--r--fdisks/fdisk.h6
-rw-r--r--fdisks/fdiskdoslabel.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/fdisks/fdisk.h b/fdisks/fdisk.h
index 54f91a1ae..d9716cc57 100644
--- a/fdisks/fdisk.h
+++ b/fdisks/fdisk.h
@@ -146,9 +146,3 @@ static inline sector_t get_start_sect(struct partition *p)
return read4_little_endian(p->start4);
}
-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));
-}
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);