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_list.c
diff --git
a/libsysio/tests/test_list.c
b/libsysio/tests/test_list.c
index
4dc0a82
..
b9e4c0d
100644
(file)
--- a/
libsysio/tests/test_list.c
+++ b/
libsysio/tests/test_list.c
@@
-44,21
+44,20
@@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef REDSTORM
-#include <getopt.h>
-#else
#include <unistd.h>
#include <unistd.h>
-#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <sys/queue.h>
#include <dirent.h>
#include <dirent.h>
+#include <sys/uio.h>
+#include <sys/queue.h>
+#include <getopt.h>
+#if defined(SYSIO_LABEL_NAMES)
#include "sysio.h"
#include "sysio.h"
-#
include "mount.h"
-
+#
endif
+#include "xtio.h"
#include "test.h"
/*
#include "test.h"
/*
@@
-138,7
+137,7
@@
main(int argc, char *const argv[])
/*
* Clean up.
*/
/*
* Clean up.
*/
- _sysio_shutdown();
+ _
test_
sysio_shutdown();
return 0;
}
return 0;
}
@@
-152,7
+151,7
@@
listit(const char *path)
off_t base;
ssize_t cc;
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;
if (fd < 0) {
perror(path);
return -1;
@@
-166,8
+165,10
@@
listit(const char *path)
goto out;
}
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",
dp = buf;
while (cc > 0) {
(void )printf("\t%s: ino %llu type %u\n",
@@
-177,8
+178,6
@@
listit(const char *path)
cc -= dp->d_reclen;
dp = (struct dirent *)((char *)dp + dp->d_reclen);
}
cc -= dp->d_reclen;
dp = (struct dirent *)((char *)dp + dp->d_reclen);
}
- if (!base)
- break;
}
out:
}
out:
@@
-189,7
+188,7
@@
out:
{
int oerrno = errno;
{
int oerrno = errno;
- if (
close
(fd) != 0) {
+ if (
SYSIO_INTERFACE_NAME(close)
(fd) != 0) {
perror(path);
if (cc < 0)
errno = oerrno;
perror(path);
if (cc < 0)
errno = oerrno;