summaryrefslogtreecommitdiff
path: root/source3/torture/cmd_vfs.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-10-14 04:00:08 +0000
committerTim Potter <tpot@samba.org>2003-10-14 04:00:08 +0000
commitc06d6e0afe489fc13c0e5c5485fcf6f1298c52dc (patch)
tree2a3de0236b8c880384a7e916c6bd6ffd69b9c828 /source3/torture/cmd_vfs.c
parentf631ec52abfca33fea5fe2b04c42e0ca68b17359 (diff)
downloadsamba-c06d6e0afe489fc13c0e5c5485fcf6f1298c52dc.tar.gz
samba-c06d6e0afe489fc13c0e5c5485fcf6f1298c52dc.tar.bz2
samba-c06d6e0afe489fc13c0e5c5485fcf6f1298c52dc.zip
Enclose usage of st_blksize and st_blocks struct stat members in
#ifdef HAVE_STAT_ST_BLKSIZE and #ifdef HAVE_STAT_ST_BLOCKS, respectively. Fixes bug 550 reported by Joachim Schmitz <schmitz@hp.com>. (This used to be commit 3d777f5389ed6b4ab8c42eb110d41f7df309bead)
Diffstat (limited to 'source3/torture/cmd_vfs.c')
-rw-r--r--source3/torture/cmd_vfs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 8317a57a20..bfce4b88b4 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -522,8 +522,12 @@ static NTSTATUS cmd_stat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
else if (S_ISLNK(st.st_mode)) printf(" Symbolic Link\n");
else if (S_ISSOCK(st.st_mode)) printf(" Socket\n");
printf(" Size: %10u", (unsigned int)st.st_size);
+#ifdef HAVE_STAT_ST_BLOCKS
printf(" Blocks: %9u", (unsigned int)st.st_blocks);
+#endif
+#ifdef HAVE_STAT_ST_BLKSIZE
printf(" IO Block: %u\n", (unsigned int)st.st_blksize);
+#endif
printf(" Device: 0x%10x", (unsigned int)st.st_dev);
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);
@@ -586,8 +590,12 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
else if (S_ISLNK(st.st_mode)) printf(" Symbolic Link\n");
else if (S_ISSOCK(st.st_mode)) printf(" Socket\n");
printf(" Size: %10u", (unsigned int)st.st_size);
+#ifdef HAVE_STAT_ST_BLOCKS
printf(" Blocks: %9u", (unsigned int)st.st_blocks);
+#endif
+#ifdef HAVE_STAT_ST_BLKSIZE
printf(" IO Block: %u\n", (unsigned int)st.st_blksize);
+#endif
printf(" Device: 0x%10x", (unsigned int)st.st_dev);
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);
@@ -638,8 +646,12 @@ static NTSTATUS cmd_lstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
else if (S_ISLNK(st.st_mode)) printf(" Symbolic Link\n");
else if (S_ISSOCK(st.st_mode)) printf(" Socket\n");
printf(" Size: %10u", (unsigned int)st.st_size);
+#ifdef HAVE_STAT_ST_BLOCKS
printf(" Blocks: %9u", (unsigned int)st.st_blocks);
+#endif
+#ifdef HAVE_STAT_ST_BLKSIZE
printf(" IO Block: %u\n", (unsigned int)st.st_blksize);
+#endif
printf(" Device: 0x%10x", (unsigned int)st.st_dev);
printf(" Inode: %10u", (unsigned int)st.st_ino);
printf(" Links: %10u\n", (unsigned int)st.st_nlink);