Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b=24416 debian packaging fixes
[fs/lustre-release.git]
/
libsysio
/
tests
/
test_stats.c
diff --git
a/libsysio/tests/test_stats.c
b/libsysio/tests/test_stats.c
index
951e7cf
..
e604d9d
100644
(file)
--- a/
libsysio/tests/test_stats.c
+++ b/
libsysio/tests/test_stats.c
@@
-41,8
+41,6
@@
* lee@sandia.gov
*/
* lee@sandia.gov
*/
-#define _BSD_SOURCE
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@
-54,7
+52,11
@@
#include <sys/statvfs.h>
#endif
#include <sys/uio.h>
#include <sys/statvfs.h>
#endif
#include <sys/uio.h>
+#include <getopt.h>
+#if defined(SYSIO_LABEL_NAMES)
+#include "sysio.h"
+#endif
#include "xtio.h"
#include "test.h"
#include "xtio.h"
#include "test.h"
@@
-91,7
+93,7
@@
main(int argc, char * const argv[])
exit(1);
}
exit(1);
}
- (void )
umask
(022);
+ (void )
SYSIO_INTERFACE_NAME(umask)
(022);
while (optind < argc)
do_stats(argv[optind++]);
while (optind < argc)
do_stats(argv[optind++]);
@@
-124,19
+126,19
@@
do_stats(const char *path)
struct statvfs stvfsbuf1, stvfsbuf2;
#endif
struct statvfs stvfsbuf1, stvfsbuf2;
#endif
- fd =
open
(path, O_RDONLY);
+ fd =
SYSIO_INTERFACE_NAME(open)
(path, O_RDONLY);
if (fd < 0) {
perror(path);
return;
}
if (fd < 0) {
perror(path);
return;
}
- err =
fstat
(fd, &stbuf1);
+ err =
SYSIO_INTERFACE_NAME(fstat)
(fd, &stbuf1);
if (!err)
if (!err)
- err =
stat
(path, &stbuf2);
+ err =
SYSIO_INTERFACE_NAME(stat)
(path, &stbuf2);
#ifdef notdef
if (!err)
#ifdef notdef
if (!err)
- err =
fstatvfs
(fd, &stvfsbuf1);
+ err =
SYSIO_INTERFACE_NAME(fstatvfs)
(fd, &stvfsbuf1);
if (!err)
if (!err)
- err =
statvfs
(path, &stvfsbuf1);
+ err =
SYSIO_INTERFACE_NAME(statvfs)
(path, &stvfsbuf1);
#endif
if (err) {
perror(path);
#endif
if (err) {
perror(path);
@@
-182,6
+184,6
@@
do_stats(const char *path)
(unsigned long )stbuf1.st_mtime,
(unsigned long )stbuf1.st_ctime);
out:
(unsigned long )stbuf1.st_mtime,
(unsigned long )stbuf1.st_ctime);
out:
- if (
close
(fd) != 0)
+ if (
SYSIO_INTERFACE_NAME(close)
(fd) != 0)
perror("closing file");
}
perror("closing file");
}