As /etc/mtab does not list original mount type and fsname
of bind mount point, using /prc/mounts to list out the
properties of the original mount point of bind mount.
Signed-off-by: vinayakswami hariharmath <vinayakswami.hariharmath@seagate.com>
Change-Id: Icf3644303552d56ad4e336decc5fadca581ff358
Reviewed-on: http://review.whamcloud.com/18195
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
int rc = -ENODEV;
/* get the mount point */
- fp = setmntent(MOUNTED, "r");
+ fp = setmntent(PROC_MOUNTS, "r");
if (fp == NULL) {
rc = -EIO;
llapi_error(LLAPI_MSG_ERROR, rc,
- "setmntent(%s) failed", MOUNTED);
+ "setmntent(%s) failed", PROC_MOUNTS);
return rc;
}
while (1) {
#define WANT_FD 0x4
#define WANT_INDEX 0x8
#define WANT_ERROR 0x10
+
+/* mount point listings in /proc/mounts */
+#ifndef PROC_MOUNTS
+#define PROC_MOUNTS "/proc/mounts"
+#endif
+
int get_root_path(int want, char *fsname, int *outfd, char *path, int index);
int root_ioctl(const char *mdtname, int opc, void *data, int *mdtidxp,
int want_error);