70b8614151
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1221 6952d904-891a-0410-993b-d76249ca496b
69 lines
2.5 KiB
Diff
69 lines
2.5 KiB
Diff
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
|
|
Date: 2009-05-17
|
|
Initial Package Version: changeset cb5655728089
|
|
Origin: hirofumi
|
|
Upstream Status: accepted
|
|
Description: make it compile with gcc 4.4
|
|
|
|
diff -Naur tux3.orig/user/buffer.c tux3/user/buffer.c
|
|
--- tux3.orig/user/buffer.c 2009-05-17 20:13:43.440868934 +0000
|
|
+++ tux3/user/buffer.c 2009-05-17 19:19:25.410186739 +0000
|
|
@@ -475,7 +475,7 @@
|
|
|
|
data_allocation_failure:
|
|
warn("Error: %s unable to allocate space for buffer data", strerror(err));
|
|
- free(buffers);
|
|
+ free(prealloc_heads);
|
|
buffers_allocation_failure:
|
|
warn("Unable to pre-allocate buffers. Using on demand allocation for buffers");
|
|
return err;
|
|
diff -Naur tux3.orig/user/filemap.c tux3/user/filemap.c
|
|
--- tux3.orig/user/filemap.c 2009-05-17 20:08:53.666087715 +0000
|
|
+++ tux3/user/filemap.c 2009-05-17 21:00:44.090339498 +0000
|
|
@@ -174,7 +174,7 @@
|
|
error("usage: %s <volname>", argv[0]);
|
|
char *name = argv[1];
|
|
int fd = open(name, O_CREAT|O_TRUNC|O_RDWR, S_IRWXU);
|
|
- ftruncate(fd, 1 << 24);
|
|
+ assert(!ftruncate(fd, 1 << 24));
|
|
u64 size = 0;
|
|
if (fdsize64(fd, &size))
|
|
error("fdsize64 failed for '%s' (%s)", name, strerror(errno));
|
|
diff -Naur tux3.orig/user/inode.c tux3/user/inode.c
|
|
--- tux3.orig/user/inode.c 2009-05-17 20:08:53.666087715 +0000
|
|
+++ tux3/user/inode.c 2009-05-17 21:00:56.732117020 +0000
|
|
@@ -298,7 +298,7 @@
|
|
int err = 0;
|
|
char *name = argv[1];
|
|
int fd = open(name, O_CREAT|O_TRUNC|O_RDWR, S_IRWXU);
|
|
- ftruncate(fd, 1 << 24);
|
|
+ assert(!ftruncate(fd, 1 << 24));
|
|
u64 size = 0;
|
|
if (fdsize64(fd, &size))
|
|
error("fdsize64 failed for '%s' (%s)", name, strerror(errno));
|
|
diff -Naur tux3.orig/user/tux3graph.c tux3/user/tux3graph.c
|
|
--- tux3.orig/user/tux3graph.c 2009-05-17 20:08:53.663191990 +0000
|
|
+++ tux3/user/tux3graph.c 2009-05-17 21:14:04.331375933 +0000
|
|
@@ -746,7 +746,8 @@
|
|
fd = fileno(src);
|
|
lseek(fd, 0, SEEK_SET);
|
|
while ((size = read(fd, buf, sizeof(buf))) > 0) {
|
|
- fwrite(buf, size, 1, dst);
|
|
+ size_t n = fwrite(buf, size, 1, dst);
|
|
+ assert(n == 1);
|
|
}
|
|
}
|
|
|
|
diff -Naur tux3.orig/user/xattr.c tux3/user/xattr.c
|
|
--- tux3.orig/user/xattr.c 2009-05-17 20:08:53.673031004 +0000
|
|
+++ tux3/user/xattr.c 2009-05-17 20:54:32.426118888 +0000
|
|
@@ -28,7 +28,7 @@
|
|
{
|
|
unsigned abits = DATA_BTREE_BIT|CTIME_SIZE_BIT|MODE_OWNER_BIT|LINK_COUNT_BIT|MTIME_BIT;
|
|
struct dev *dev = &(struct dev){ .bits = 8, .fd = open(argv[1], O_CREAT|O_RDWR, S_IRWXU) };
|
|
- ftruncate(dev->fd, 1 << 24);
|
|
+ assert(!ftruncate(dev->fd, 1 << 24));
|
|
init_buffers(dev, 1 << 20, 0);
|
|
struct sb *sb = rapid_sb(dev,
|
|
.version = 0,
|