Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fb232f
)
Add truncate-to-zero to multiop commands.
author
adilger
<adilger>
Tue, 19 Aug 2003 22:19:25 +0000
(22:19 +0000)
committer
adilger
<adilger>
Tue, 19 Aug 2003 22:19:25 +0000
(22:19 +0000)
lustre/tests/multiop.c
patch
|
blob
|
history
diff --git
a/lustre/tests/multiop.c
b/lustre/tests/multiop.c
index
d8fec95
..
d02c3e3
100755
(executable)
--- a/
lustre/tests/multiop.c
+++ b/
lustre/tests/multiop.c
@@
-25,6
+25,7
@@
char usage[] =
" s stat\n"
" S fstat\n"
" t fchmod\n"
+" T ftruncate to zero\n"
" w write\n"
" z seek to zero\n";
@@
-96,12
+97,18
@@
int main(int argc, char **argv)
exit(1);
}
break;
- case 't':
+ case 't':
if (fchmod(fd, 0) == -1) {
perror("fchmod");
exit(1);
}
break;
+ case 'T':
+ if (ftruncate(fd, 0) == -1) {
+ perror("ftruncate");
+ exit(1);
+ }
+ break;
case 'u':
if (unlink(fname) == -1) {
perror("unlink");
@@
-126,6
+133,6
@@
int main(int argc, char **argv)
exit(1);
}
}
-
+
return 0;
}