/* Default -- if @map specified then returns all options for the map, otherwise
* returns all options including uknonwn options, exclude external options */
MNT_OL_FLTR_DFLT = 0,
+ /* Options as expected by mount.<type> helpers */
+ MNT_OL_FLTR_HELPERS,
+ /* Options as expected in mtab */
+ MNT_OL_FLTR_MTAB,
/* All options -- include mapped, unknown and external options */
MNT_OL_FLTR_ALL,
- /* All unknown options -- exclude external */
+ /* All unknown options -- exclude external (usually FS specific options) */
MNT_OL_FLTR_UNKNOWN,
__MNT_OL_FLTR_COUNT /* keep it last */
if (opt->map || opt->external)
continue;
break;
+ case MNT_OL_FLTR_HELPERS:
+ if (opt->ent && opt->ent->mask & MNT_NOHLPS)
+ continue;
+ break;
+ case MNT_OL_FLTR_MTAB:
+ if (opt->ent && opt->ent->mask & MNT_NOMTAB)
+ continue;
+ break;
}
rc = mnt_buffer_append_option(&buf,
cache = &ls->cache_all[MNT_OL_FLTR_DFLT];
break;
case MNT_OL_FLTR_ALL:
- cache = &ls->cache_all[MNT_OL_FLTR_ALL];
- break;
case MNT_OL_FLTR_UNKNOWN:
- cache = &ls->cache_all[MNT_OL_FLTR_UNKNOWN];
+ case MNT_OL_FLTR_HELPERS:
+ case MNT_OL_FLTR_MTAB:
+ cache = &ls->cache_all[what];
break;
default:
return -EINVAL;