#include "mount_mntent.h"
int mtab_is_writable(void);
+int mtab_is_a_symlink(void);
int mtab_does_not_exist(void);
void reset_mtab_info(void);
int is_mounted_once(const char *name);
static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit,
*opt_encryption, *opt_speed, *opt_comment, *opt_uhelper;
+static int is_readonly(const char *node);
static int mounted (const char *spec0, const char *node0);
static int check_special_mountprog(const char *spec, const char *node,
const char *type, int flags, char *extra_opts, int *status);
if (matching_type (mc->m.mnt_type, types))
print_one (&(mc->m));
}
+
+ if (!mtab_does_not_exist() && !mtab_is_a_symlink() && is_readonly(_PATH_MOUNTED))
+ printf(_("\n"
+ "mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).\n"
+ " It's possible that information reported by mount(8) is not\n"
+ " up to date. For actual information about system mount points\n"
+ " check the /proc/mounts file.\n\n"));
+
exit (0);
}