{
if (!fs)
return NULL;
- if (!fs->target && mnt_fs_want_statmount(fs, STATMOUNT_MNT_POINT))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_POINT);
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, target, STATMOUNT_MNT_POINT);
+#endif
return fs->target;;
}
{
if (!fs || !flags)
return -EINVAL;
- if (!fs->propagation && mnt_fs_want_statmount(fs, STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, propagation, STATMOUNT_MNT_BASIC);
+#endif
if (!fs->propagation && fs->opt_fields) {
/*
* The optional fields format is incompatible with mount options
{
if (!fs)
return 0;
- if (!fs->fstype && mnt_fs_want_statmount(fs, STATMOUNT_FS_TYPE))
- mnt_fs_fetch_statmount(fs, STATMOUNT_FS_TYPE);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, fstype, STATMOUNT_FS_TYPE);
+#endif
return mnt_fs_get_flags(fs) & MNT_FS_PSEUDO ? 1 : 0;
}
{
if (!fs)
return 0;
- if (!fs->fstype && mnt_fs_want_statmount(fs, STATMOUNT_FS_TYPE))
- mnt_fs_fetch_statmount(fs, STATMOUNT_FS_TYPE);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, fstype, STATMOUNT_FS_TYPE);
+#endif
return mnt_fs_get_flags(fs) & MNT_FS_NET ? 1 : 0;
}
{
if (!fs)
return NULL;
-
- if (!fs->fstype && mnt_fs_want_statmount(fs, STATMOUNT_FS_TYPE))
- mnt_fs_fetch_statmount(fs, STATMOUNT_FS_TYPE);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, fstype, STATMOUNT_FS_TYPE);
+#endif
return fs->fstype;
}
return NULL;
if (fs->optlist)
sync_opts_from_optlist(fs, fs->optlist);
- else if (!fs->optstr && mnt_fs_want_statmount(fs, STATMOUNT_SB_BASIC | STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_SB_BASIC | STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ else
+ mnt_fs_try_statmount(fs, optstr, STATMOUNT_SB_BASIC | STATMOUNT_MNT_BASIC);
+#endif
errno = 0;
if (fs->optstr)
return strdup(fs->optstr);
return NULL;
if (fs->optlist)
sync_opts_from_optlist(fs, fs->optlist);
- else if (!fs->optstr && mnt_fs_want_statmount(fs, STATMOUNT_SB_BASIC | STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_SB_BASIC | STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ else
+ mnt_fs_try_statmount(fs, optstr, STATMOUNT_SB_BASIC | STATMOUNT_MNT_BASIC);
+#endif
return fs->optstr;
}
return NULL;
if (fs->optlist)
sync_opts_from_optlist(fs, fs->optlist);
- else if (!fs->fs_optstr && mnt_fs_want_statmount(fs, STATMOUNT_SB_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_SB_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ else
+ mnt_fs_try_statmount(fs, fs_optstr, STATMOUNT_SB_BASIC);
+#endif
return fs->fs_optstr;
}
return NULL;
if (fs->optlist)
sync_opts_from_optlist(fs, fs->optlist);
- else if (!fs->vfs_optstr && mnt_fs_want_statmount(fs, STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ else
+ mnt_fs_try_statmount(fs, vfs_optstr, STATMOUNT_MNT_BASIC);
+#endif
return fs->vfs_optstr;
}
{
if (!fs)
return NULL;
- if (!fs->root && mnt_fs_want_statmount(fs, STATMOUNT_MNT_ROOT))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_ROOT);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, root, STATMOUNT_MNT_ROOT);
+#endif
return fs->root;
}
{
if (!fs)
return 0;
- if (!fs->id && mnt_fs_want_statmount(fs, STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, id, STATMOUNT_MNT_BASIC);
+#endif
return fs->id;
}
{
if (!fs)
return 0;
- if (!fs->uniq_id && mnt_fs_want_statmount(fs, STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, uniq_id, STATMOUNT_MNT_BASIC);
+#endif
return fs->uniq_id;
}
{
if (!fs)
return 0;
- if (!fs->parent && mnt_fs_want_statmount(fs, STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, parent, STATMOUNT_MNT_BASIC);
+#endif
return fs->parent;
}
{
if (!fs)
return 0;
- if (!fs->uniq_parent && mnt_fs_want_statmount(fs, STATMOUNT_MNT_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, uniq_parent, STATMOUNT_MNT_BASIC);
+#endif
return fs->uniq_parent;
}
{
if (!fs)
return 0;
- if (!fs->ns_id && mnt_fs_want_statmount(fs, STATMOUNT_MNT_NS_ID))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_NS_ID);
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, ns_id, STATMOUNT_MNT_NS_ID);
+#endif
return fs->ns_id;
}
{
if (!fs)
return 0;
- if (!fs->devno && mnt_fs_want_statmount(fs, STATMOUNT_SB_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_SB_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, devno, STATMOUNT_SB_BASIC);
+#endif
return fs->devno;
}
if (fs->optlist)
sync_opts_from_optlist(fs, fs->optlist);
- else if (!fs->vfs_optstr && mnt_fs_want_statmount(fs, STATMOUNT_MNT_BASIC | STATMOUNT_SB_BASIC))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_BASIC | STATMOUNT_SB_BASIC);
-
+#ifdef HAVE_STATMOUNT_API
+ else
+ mnt_fs_try_statmount(fs, vfs_optstr, STATMOUNT_SB_BASIC | STATMOUNT_MNT_BASIC);
+#endif
if (fs->fs_optstr)
rc = mnt_optstr_get_option(fs->fs_optstr, name, value, valsz);
if (rc == 1 && fs->vfs_optstr)
if (!fs || !target)
return 0;
- if (!fs->target && mnt_fs_want_statmount(fs, STATMOUNT_MNT_POINT))
- mnt_fs_fetch_statmount(fs, STATMOUNT_MNT_POINT);
+#ifdef HAVE_STATMOUNT_API
+ mnt_fs_try_statmount(fs, target, STATMOUNT_MNT_BASIC);
+#endif
if (!fs->target)
return 0;