X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libsysio%2Ftests%2Ftest_path.c;h=8776b6ef45d0984d5cb3e0c7133eb7f8ce56906c;hb=718aa78a4cf0125caccd50deb3d159effd620199;hp=a7469b3749045db3750ad1712b5fbb02d42c44fc;hpb=b8292c00324fbe9a25910ce53d03569186ea3e2c;p=fs%2Flustre-release.git diff --git a/libsysio/tests/test_path.c b/libsysio/tests/test_path.c index a7469b3..8776b6e 100644 --- a/libsysio/tests/test_path.c +++ b/libsysio/tests/test_path.c @@ -44,21 +44,17 @@ #include #include #include -#ifndef REDSTORM -#include -#else -#include -#endif #include - -#include -#include #include #include +#include +#include +#include +#if defined(SYSIO_LABEL_NAMES) #include "sysio.h" -#include "mount.h" - +#endif +#include "xtio.h" #include "test.h" /* @@ -138,7 +134,7 @@ main(int argc, char *const argv[]) /* * Clean up. */ - _sysio_shutdown(); + _test_sysio_shutdown(); return 0; } @@ -155,7 +151,7 @@ statit(const char *path) /* * Get file attrs. */ - err = lstat(path, &stbuf); + err = SYSIO_INTERFACE_NAME(lstat)(path, &stbuf); if (err) { perror(path); return -1; @@ -203,7 +199,7 @@ statit(const char *path) * Print path and type. */ if (S_ISLNK(stbuf.st_mode)) { - cc = readlink(path, buf, sizeof(buf)); + cc = SYSIO_INTERFACE_NAME(readlink)(path, buf, sizeof(buf)); if (cc < 0) { perror(path); return -1; @@ -211,7 +207,7 @@ statit(const char *path) } (void )printf("%s: %c", path, t); if (S_ISLNK(stbuf.st_mode) && (size_t )cc < sizeof(buf)) - (void )printf(" %.*s", cc, buf); + (void )printf(" %.*s", (int )cc, buf); (void )putchar('\n'); return 0;