[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080820173358.23412.26392.stgit@gara>
Date: Wed, 20 Aug 2008 12:33:58 -0500
From: "Jose R. Santos" <jrs@...ibm.com>
To: "Theodore Ts'o" <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: [PATCH 12/15][e2fsprogs] Add ext2fs_div64_ceil()
From: Jose R. Santos <jrs@...ibm.com>
Add ext2fs_div64_ceil()
Add a new div_cell routine able to handle 64bit values
Signed-off-by: Jose R. Santos <jrs@...ibm.com>
--
lib/ext2fs/ext2fs.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index 38bca4d..99c2c5f 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -1415,6 +1415,14 @@ _INLINE_ unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b)
return 0;
return ((a - 1) / b) + 1;
}
+
+_INLINE_ __u64 ext2fs_div64_ceil(__u64 a, __u64 b)
+{
+ if (!a)
+ return 0;
+ return ((a - 1) / b) + 1;
+}
+
#undef _INLINE_
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists