]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: move get_nr_sects() fdisk.h
authorKarel Zak <kzak@redhat.com>
Wed, 12 Jun 2013 15:16:39 +0000 (17:16 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:47:01 +0000 (16:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisk.c
fdisks/fdisk.h

index 051198161cdc3ceb49751be91ad4b8310046b4a1..0087c235e4ae1115f97345292dd73c13162a1eb2 100644 (file)
 #endif
 
 
-sector_t get_nr_sects(struct partition *p) {
-       return read4_little_endian(p->size4);
-}
-
 int    nowarn = 0;                     /* no warnings for fdisk -l/-s */
 
 void toggle_units(struct fdisk_context *cxt)
index 7ecfa256987b47cb13616ccecebb7823b5f8eead..3f4bbdb788205b795916ad3cf89d6950d824b0e1 100644 (file)
@@ -86,8 +86,6 @@ extern unsigned int read_int_with_suffix(struct fdisk_context *cxt,
                                         unsigned int low, unsigned int dflt, unsigned int high,
                                  unsigned int base, char *mesg, int *is_suffix_used);
 
-extern sector_t get_nr_sects(struct partition *p);
-
 extern int nowarn;
 
 /* start_sect and nr_sects are stored little endian on all machines */
@@ -107,6 +105,11 @@ static inline unsigned int read4_little_endian(const unsigned char *cp)
                + ((unsigned int)(cp[3]) << 24);
 }
 
+static inline sector_t get_nr_sects(struct partition *p)
+{
+       return read4_little_endian(p->size4);
+}
+
 static inline void set_nr_sects(struct partition *p, sector_t nr_sects)
 {
        store4_little_endian(p->size4, nr_sects);