]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: cleanup header file
authorKarel Zak <kzak@redhat.com>
Tue, 25 Jun 2013 13:58:36 +0000 (15:58 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:47:04 +0000 (16:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisk.h
fdisks/fdiskdoslabel.c

index 23c4e3f0a6b5e7fccb12c405c689c72377953cc1..5aaf0f2ebae6b59147832a59fc89a302944b1b28 100644 (file)
@@ -55,38 +55,11 @@ extern int ask_callback(struct fdisk_context *cxt, struct fdisk_ask *ask,
 extern void list_partition_types(struct fdisk_context *cxt);
 extern struct fdisk_parttype *ask_partition_type(struct fdisk_context *cxt);
 extern void reread_partition_table(struct fdisk_context *cxt, int leave);
-extern unsigned int read_int(struct fdisk_context *cxt,
-                            unsigned int low, unsigned int dflt,
-                            unsigned int high, unsigned int base, char *mesg);
 
 extern char *partition_type(struct fdisk_context *cxt, unsigned char type);
-extern char read_chars(struct fdisk_context *cxt, char *mesg);
 extern int warn_geometry(struct fdisk_context *cxt);
 extern void toggle_dos_compatibility_flag(struct fdisk_context *cxt);
 extern void warn_limits(struct fdisk_context *cxt);
-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 int nowarn;
 
-
-static inline int seek_sector(struct fdisk_context *cxt, sector_t secno)
-{
-       off_t offset = (off_t) secno * cxt->sector_size;
-
-       return lseek(cxt->dev_fd, offset, SEEK_SET) == (off_t) -1 ? -errno : 0;
-}
-
-static inline int read_sector(struct fdisk_context *cxt, sector_t secno, unsigned char *buf)
-{
-       int rc = seek_sector(cxt, secno);
-
-       if (rc < 0)
-               return rc;
-
-       return read(cxt->dev_fd, buf, cxt->sector_size) !=
-                       (ssize_t) cxt->sector_size ? -errno : 0;
-}
-
-
index 84c4a34311e39e62eb075f43092f636c4c768343..67199eaeaa65976e6683e1aa8f90ce1f2d1400ea 100644 (file)
@@ -175,6 +175,24 @@ static int get_partition_unused_primary(struct fdisk_context *cxt)
        }
 }
 
+static int seek_sector(struct fdisk_context *cxt, sector_t secno)
+{
+       off_t offset = (off_t) secno * cxt->sector_size;
+
+       return lseek(cxt->dev_fd, offset, SEEK_SET) == (off_t) -1 ? -errno : 0;
+}
+
+static int read_sector(struct fdisk_context *cxt, sector_t secno,
+                       unsigned char *buf)
+{
+       int rc = seek_sector(cxt, secno);
+
+       if (rc < 0)
+               return rc;
+
+       return read(cxt->dev_fd, buf, cxt->sector_size) !=
+                       (ssize_t) cxt->sector_size ? -errno : 0;
+}
 
 /* Allocate a buffer and read a partition table sector */
 static int read_pte(struct fdisk_context *cxt, int pno, sector_t offset)