public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 10/14] minix: use off_t, size_t, etc appropriate types
Date: Sun, 16 Dec 2012 10:43:58 +0000	[thread overview]
Message-ID: <1355654642-22106-11-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1355654642-22106-1-git-send-email-kerolasa@iki.fi>

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 disk-utils/fsck.minix.c | 12 ++++++------
 disk-utils/mkfs.minix.c |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index f24a9f2..6189b0b 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -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))
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c
index 343ec68..b445c0c 100644
--- a/disk-utils/mkfs.minix.c
+++ b/disk-utils/mkfs.minix.c
@@ -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();
-- 
1.8.0.2


  parent reply	other threads:[~2012-12-16 10:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-16 10:43 [00/14]: pull: ipcs resubmission, bug fixes, minix todo, etc Sami Kerola
2012-12-16 10:43 ` [PATCH 01/14] docs: swapon.8 option name fix Sami Kerola
2012-12-16 10:43 ` [PATCH 02/14] ipcs: assist debugging Sami Kerola
2012-12-16 10:43 ` [PATCH 03/14] ipcs: add --human readable size conversion option Sami Kerola
2012-12-16 10:43 ` [PATCH 04/14] ipcs: add --bytes size output option Sami Kerola
2012-12-16 10:43 ` [PATCH 05/14] isosize: fix usage() -h option print out Sami Kerola
2012-12-16 10:43 ` [PATCH 06/14] isosize: inform if file does not look like iso file system Sami Kerola
2012-12-16 10:43 ` [PATCH 07/14] more: remove unnecessary variable Sami Kerola
2012-12-16 10:43 ` [PATCH 08/14] tunelp: deprecation: remove command from default build Sami Kerola
2012-12-16 10:43 ` [PATCH 09/14] minix: change types in header file Sami Kerola
2012-12-16 10:43 ` Sami Kerola [this message]
2012-12-16 10:43 ` [PATCH 11/14] minix: replace magic constants with macro names Sami Kerola
2012-12-16 10:44 ` [PATCH 12/14] docs: add missing exit value to fsck.minix(8) Sami Kerola
2012-12-16 10:44 ` [PATCH 13/14] lib/ismounted: detect loopback mounts Sami Kerola
2012-12-19 13:38   ` Karel Zak
2012-12-16 10:44 ` [PATCH 14/14] docs: fsck(8), mkfs(8): update manual references Sami Kerola
2012-12-19 13:54   ` Karel Zak
2012-12-19 14:29 ` [00/14]: pull: ipcs resubmission, bug fixes, minix todo, etc Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1355654642-22106-11-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox