#endif
#include <poll.h>
+#include <libcfs/util/string.h>
#include <libcfs/libcfs.h>
#include <lnet/lnetctl.h>
#include <lustre/lustreapi.h>
/*
* If uuidp is NULL, return the number of available obd uuids.
* If uuidp is non-NULL, then it will return the uuids of the obds. If
- * there are more OSTs then allocated to uuidp, then an error is returned with
+ * there are more OSTs than allocated to uuidp, then an error is returned with
* the ost_count set to number of available obd uuids.
*/
static int llapi_get_target_uuids(int fd, struct obd_uuid *uuidp,
if (param->fp_mdt_index != OBD_NOT_FOUND)
print_failed_tgt(param, path, LL_STATFS_LMV);
- if (S_ISDIR(st->st_mode))
+ if (dir != NULL)
ret = fstat_f(dirfd(dir), st);
- else if (dir != NULL)
- ret = ioctl(dirfd(dir), IOC_LOV_GETINFO,
- (void *)param->fp_lmd);
+ else if (de != NULL)
+ ret = fstatat_f(dirfd(parent), de->d_name, st,
+ AT_SYMLINK_NOFOLLOW);
else
- ret = ioctl(dirfd(parent), IOC_LOV_GETINFO,
- (void *)param->fp_lmd);
+ ret = lstat_f(path, st);
if (ret) {
if (errno == ENOENT) {