[sheepdog] [PATCH] sheep journal:change parameter type
zhangcanqun
zhangcanqun_sd at 163.com
Thu Apr 16 07:50:07 CEST 2015
Fix the parameter type of 'size' passed to 'int prealloc(int fd, uint32_t size)'
Signed-off-by: zhangcanqun <zhangcanqun_sd at 163.com>
---
include/util.h | 2 +-
lib/util.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/util.h b/include/util.h
index 34a3e32..e7e3aa4 100644
--- a/include/util.h
+++ b/include/util.h
@@ -124,7 +124,7 @@ void *xzalloc(size_t size);
void *xrealloc(void *ptr, size_t size);
void *xcalloc(size_t nmemb, size_t size);
void *xvalloc(size_t size);
-int prealloc(int fd, uint32_t size);
+int prealloc(int fd, uint64_t size);
ssize_t xread(int fd, void *buf, size_t len);
ssize_t xwrite(int fd, const void *buf, size_t len);
ssize_t xpread(int fd, void *buf, size_t count, off_t offset);
diff --git a/lib/util.c b/lib/util.c
index c50d298..7a0bf5f 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -107,7 +107,7 @@ void *xvalloc(size_t size)
}
/* preallocate the whole object */
-int prealloc(int fd, uint32_t size)
+int prealloc(int fd, uint64_t size)
{
int ret = xfallocate(fd, 0, 0, size);
if (ret < 0) {
--
1.7.1
More information about the sheepdog
mailing list