]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
minix: use off_t, size_t, etc appropriate types
authorSami Kerola <kerolasa@iki.fi>
Sun, 16 Dec 2012 10:43:58 +0000 (10:43 +0000)
committerKarel Zak <kzak@redhat.com>
Wed, 19 Dec 2012 10:38:53 +0000 (11:38 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/fsck.minix.c
disk-utils/mkfs.minix.c

index f24a9f215095bd0afbbacf9694b4355ec7105fb2..6189b0bf402bdfbee7268fb2cb86e3f6c8b689e3 100644 (file)
@@ -584,9 +584,9 @@ read_superblock(void) {
 static void
 read_tables(void) {
        unsigned long inodes = get_ninodes();
-       unsigned long buffsz = get_inode_buffer_size();
-       unsigned long norm_first_zone = first_zone_data();
-       unsigned long first_zone = get_first_zone();
+       size_t buffsz = get_inode_buffer_size();
+       off_t norm_first_zone = first_zone_data();
+       off_t first_zone = get_first_zone();
        unsigned long zones = get_nzones();
        unsigned long imaps = get_nimaps();
        unsigned long zmaps = get_nzmaps();
@@ -999,7 +999,7 @@ static void
 check_file2(struct minix2_inode *dir, unsigned int offset) {
        static char blk[MINIX_BLOCK_SIZE];
        struct minix2_inode *inode;
-       unsigned long ino;
+       ino_t ino;
        char *name;
        int block;
 
@@ -1064,7 +1064,7 @@ check_file2(struct minix2_inode *dir, unsigned int offset) {
 static void
 recursive_check(unsigned int ino) {
        struct minix_inode *dir;
-       unsigned int offset;
+       off_t offset;
 
        dir = Inode + ino;
        if (!S_ISDIR(dir->i_mode))
@@ -1081,7 +1081,7 @@ recursive_check(unsigned int ino) {
 static void
 recursive_check2(unsigned int ino) {
        struct minix2_inode *dir;
-       unsigned int offset;
+       off_t offset;
 
        dir = Inode2 + ino;
        if (!S_ISDIR(dir->i_mode))
index 343ec688fb18469acaa15411d13aeb2e1614c310..b445c0c6ca5ce5e6e1dbe620972e451f9a2c0129 100644 (file)
@@ -188,7 +188,7 @@ static void super_set_state(void)
 static void write_tables(void) {
        unsigned long imaps = get_nimaps();
        unsigned long zmaps = get_nzmaps();
-       unsigned long buffsz = get_inode_buffer_size();
+       size_t buffsz = get_inode_buffer_size();
 
        /* Mark the super block valid. */
        super_set_state();
@@ -552,8 +552,8 @@ static void setup_tables(void) {
  * Perform a test of a block; return the number of
  * blocks readable/writeable.
  */
-static long do_check(char * buffer, int try, unsigned int current_block) {
-       long got;
+static size_t do_check(char * buffer, int try, unsigned int current_block) {
+       ssize_t got;
        
        /* Seek to the correct loc. */
        if (lseek(DEV, current_block * MINIX_BLOCK_SIZE, SEEK_SET) !=
@@ -587,7 +587,7 @@ static void alarm_intr(int alnum __attribute__ ((__unused__))) {
 }
 
 static void check_blocks(void) {
-       int try,got;
+       size_t try, got;
        static char buffer[MINIX_BLOCK_SIZE * TEST_BUFFER_BLOCKS];
        unsigned long zones = get_nzones();
        unsigned long first_zone = get_first_zone();