summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisk.h
diff options
context:
space:
mode:
authorDavidlohr Bueso2012-06-03 20:15:20 +0200
committerKarel Zak2012-06-06 10:40:40 +0200
commit618882d6095a2c11876e800fef1ff442d60605f5 (patch)
tree1c4e98f4f9ffac576f88b838591ee9ab024c9409 /fdisk/fdisk.h
parentfdisk: add device topology to the API (diff)
downloadkernel-qcow2-util-linux-618882d6095a2c11876e800fef1ff442d60605f5.tar.gz
kernel-qcow2-util-linux-618882d6095a2c11876e800fef1ff442d60605f5.tar.xz
kernel-qcow2-util-linux-618882d6095a2c11876e800fef1ff442d60605f5.zip
fdisk: add total sectors
Add the total_sectors variable to the context structure. This is the initial geometry information. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'fdisk/fdisk.h')
-rw-r--r--fdisk/fdisk.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h
index a24fa2056..61853d14c 100644
--- a/fdisk/fdisk.h
+++ b/fdisk/fdisk.h
@@ -112,6 +112,9 @@ struct fdisk_context {
unsigned long phy_sector_size; /* physical size */
unsigned long sector_size; /* logical size */
unsigned long alignment_offset;
+
+ /* geometry */
+ sector_t total_sectors; /* in logical sectors */
};
extern struct fdisk_context *fdisk_new_context_from_filename(const char *fname, int readonly);
@@ -181,8 +184,8 @@ extern enum labeltype disklabel;
*/
extern unsigned char *MBRbuffer;
extern int MBRbuffer_changed;
-extern sector_t total_number_of_sectors;
extern unsigned long grain;
+
/* start_sect and nr_sects are stored little endian on all machines */
/* moreover, they are not aligned correctly */
static inline void