#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef REDSTORM
-#include <getopt.h>
-#else
#include <unistd.h>
-#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <sys/queue.h>
#include <dirent.h>
+#include <sys/uio.h>
+#include <sys/queue.h>
+#include <getopt.h>
+#if defined(SYSIO_LABEL_NAMES)
#include "sysio.h"
-#include "mount.h"
-
+#endif
+#include "xtio.h"
#include "test.h"
/*
/*
* Clean up.
*/
- _sysio_shutdown();
+ _test_sysio_shutdown();
return 0;
}
off_t base;
ssize_t cc;
- fd = open(path, O_RDONLY);
+ fd = SYSIO_INTERFACE_NAME(open)(path, O_RDONLY);
if (fd < 0) {
perror(path);
return -1;
goto out;
}
- base = 0;
- while ((cc = getdirentries(fd, (char *)buf, n, &base)) > 0) {
+ while ((cc = SYSIO_INTERFACE_NAME(getdirentries)(fd,
+ (char *)buf,
+ n,
+ &base)) > 0) {
dp = buf;
while (cc > 0) {
(void )printf("\t%s: ino %llu type %u\n",
cc -= dp->d_reclen;
dp = (struct dirent *)((char *)dp + dp->d_reclen);
}
- if (!base)
- break;
}
out:
{
int oerrno = errno;
- if (close(fd) != 0) {
+ if (SYSIO_INTERFACE_NAME(close)(fd) != 0) {
perror(path);
if (cc < 0)
errno = oerrno;