#endif
#include <poll.h>
-#include <liblustre.h>
+#include <libcfs/libcfs.h>
#include <lnet/lnetctl.h>
#include <lustre/lustreapi.h>
#include <lustre_ioctl.h>
struct lmv_user_mds_data *objects = lum->lum_objects;
char *prefix = lum->lum_magic == LMV_USER_MAGIC ? "(Default)" : "";
int i, obdstripe = 0;
- char *seperator = "";
+ char *separator = "";
if (obdindex != OBD_NOT_FOUND) {
for (i = 0; i < lum->lum_stripe_count; i++) {
llapi_printf(LLAPI_MSG_NORMAL, "%s%s\n", prefix, path);
if (verbose & VERBOSE_COUNT) {
- llapi_printf(LLAPI_MSG_NORMAL, "%s", seperator);
+ llapi_printf(LLAPI_MSG_NORMAL, "%s", separator);
if (verbose & ~VERBOSE_COUNT)
llapi_printf(LLAPI_MSG_NORMAL, "lmv_stripe_count: ");
llapi_printf(LLAPI_MSG_NORMAL, "%u",
(int)lum->lum_stripe_count);
- seperator = "\n";
+ separator = "\n";
}
if (verbose & VERBOSE_OFFSET) {
- llapi_printf(LLAPI_MSG_NORMAL, "%s", seperator);
+ llapi_printf(LLAPI_MSG_NORMAL, "%s", separator);
if (verbose & ~VERBOSE_OFFSET)
llapi_printf(LLAPI_MSG_NORMAL, "lmv_stripe_offset: ");
llapi_printf(LLAPI_MSG_NORMAL, "%d",
(int)lum->lum_stripe_offset);
- seperator = "\n";
+ separator = "\n";
}
if (verbose & VERBOSE_OBJID && lum->lum_magic != LMV_USER_MAGIC) {
- llapi_printf(LLAPI_MSG_NORMAL, "%s", seperator);
+ llapi_printf(LLAPI_MSG_NORMAL, "%s", separator);
if (obdstripe == 1 && lum->lum_stripe_count > 0)
llapi_printf(LLAPI_MSG_NORMAL,
"mdtidx\t\t FID[seq:oid:ver]\n");
}
if ((verbose & VERBOSE_POOL) && (pool_name[0] != '\0')) {
- llapi_printf(LLAPI_MSG_NORMAL, "%s", seperator);
+ llapi_printf(LLAPI_MSG_NORMAL, "%s", separator);
if (verbose & ~VERBOSE_POOL)
llapi_printf(LLAPI_MSG_NORMAL, "%slmv_pool: ",
prefix);
llapi_printf(LLAPI_MSG_NORMAL, "%s%c ", pool_name, ' ');
- seperator = "\n";
+ separator = "\n";
}
if (!(verbose & VERBOSE_OBJID))
if (rc != -ENOENT)
llapi_error(LLAPI_MSG_ERROR, rc, "ioctl err %d", rc);
} else {
- memcpy(buf, gf->gf_path, gf->gf_pathlen);
- *recno = gf->gf_recno;
- *linkno = gf->gf_linkno;
+ memcpy(buf, gf->gf_path, gf->gf_pathlen);
+ if (buf[0] == '\0') { /* ROOT path */
+ buf[0] = '/';
+ buf[1] = '\0';
+ }
+ *recno = gf->gf_recno;
+ *linkno = gf->gf_linkno;
}
free(gf);