* lee@sandia.gov
*/
-#define _BSD_SOURCE
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#ifndef REDSTORM
-#include <getopt.h>
-#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <sys/queue.h>
#ifdef notdef
#include <sys/statvfs.h>
#endif
+#include <sys/uio.h>
+#include <getopt.h>
+#if defined(SYSIO_LABEL_NAMES)
#include "sysio.h"
-#include "mount.h"
-
+#endif
+#include "xtio.h"
#include "test.h"
/*
exit(1);
}
- (void )umask(022);
+ (void )SYSIO_INTERFACE_NAME(umask)(022);
while (optind < argc)
do_stats(argv[optind++]);
/*
* Clean up.
*/
- _sysio_shutdown();
+ _test_sysio_shutdown();
return 0;
}
struct statvfs stvfsbuf1, stvfsbuf2;
#endif
- fd = open(path, O_RDONLY);
+ fd = SYSIO_INTERFACE_NAME(open)(path, O_RDONLY);
if (fd < 0) {
perror(path);
return;
}
- err = fstat(fd, &stbuf1);
+ err = SYSIO_INTERFACE_NAME(fstat)(fd, &stbuf1);
if (!err)
- err = stat(path, &stbuf2);
+ err = SYSIO_INTERFACE_NAME(stat)(path, &stbuf2);
#ifdef notdef
if (!err)
- err = fstatvfs(fd, &stvfsbuf1);
+ err = SYSIO_INTERFACE_NAME(fstatvfs)(fd, &stvfsbuf1);
if (!err)
- err = statvfs(path, &stvfsbuf1);
+ err = SYSIO_INTERFACE_NAME(statvfs)(path, &stvfsbuf1);
#endif
if (err) {
perror(path);
(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");
}