int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags)
{
	if (!fs || !flags)
		return -EINVAL;

	*flags = 0;

	if (!fs->opt_fields)
		return 0;

	 /*
	 * The optional fields format is incompatible with mount options
	 * ... we have to parse the field here.
	 */
	*flags |= strstr(fs->opt_fields, "shared:") ? MS_SHARED : MS_PRIVATE;

	if (strstr(fs->opt_fields, "master:"))
		*flags |= MS_SLAVE;
	if (strstr(fs->opt_fields, "unbindable"))
		*flags |= MS_UNBINDABLE;

	return 0;
}
int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags)
{
	if (!fs || !flags)
		return -EINVAL;

	*flags = 0;

	if (!fs->opt_fields)
		return 0;

	  
	*flags |= strstr(fs->opt_fields, "shared:") ? MS_SHARED : MS_PRIVATE;

	if (strstr(fs->opt_fields, "master:"))
		*flags |= MS_SLAVE;
	if (strstr(fs->opt_fields, "unbindable"))
		*flags |= MS_UNBINDABLE;

	return 0;
}