diff options
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r-- | util-linux/mount.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 722d0be92..3e2ba1fab 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -16,6 +16,66 @@ | |||
16 | // singlemount() can loop through /etc/filesystems for fstype detection. | 16 | // singlemount() can loop through /etc/filesystems for fstype detection. |
17 | // mount_it_now() does the actual mount. | 17 | // mount_it_now() does the actual mount. |
18 | // | 18 | // |
19 | |||
20 | //usage:#define mount_trivial_usage | ||
21 | //usage: "[OPTIONS] [-o OPTS] DEVICE NODE" | ||
22 | //usage:#define mount_full_usage "\n\n" | ||
23 | //usage: "Mount a filesystem. Filesystem autodetection requires /proc.\n" | ||
24 | //usage: "\nOptions:" | ||
25 | //usage: "\n -a Mount all filesystems in fstab" | ||
26 | //usage: IF_FEATURE_MOUNT_FAKE( | ||
27 | //usage: IF_FEATURE_MTAB_SUPPORT( | ||
28 | //usage: "\n -f Update /etc/mtab, but don't mount" | ||
29 | //usage: ) | ||
30 | //usage: IF_NOT_FEATURE_MTAB_SUPPORT( | ||
31 | //usage: "\n -f Dry run" | ||
32 | //usage: ) | ||
33 | //usage: ) | ||
34 | //usage: IF_FEATURE_MOUNT_HELPERS( | ||
35 | //usage: "\n -i Don't run mount helper" | ||
36 | //usage: ) | ||
37 | //usage: IF_FEATURE_MTAB_SUPPORT( | ||
38 | //usage: "\n -n Don't update /etc/mtab" | ||
39 | //usage: ) | ||
40 | //usage: "\n -r Read-only mount" | ||
41 | //usage: "\n -w Read-write mount (default)" | ||
42 | //usage: "\n -t FSTYPE Filesystem type" | ||
43 | //usage: "\n -O OPT Mount only filesystems with option OPT (-a only)" | ||
44 | //usage: "\n-o OPT:" | ||
45 | //usage: IF_FEATURE_MOUNT_LOOP( | ||
46 | //usage: "\n loop Ignored (loop devices are autodetected)" | ||
47 | //usage: ) | ||
48 | //usage: IF_FEATURE_MOUNT_FLAGS( | ||
49 | //usage: "\n [a]sync Writes are [a]synchronous" | ||
50 | //usage: "\n [no]atime Disable/enable updates to inode access times" | ||
51 | //usage: "\n [no]diratime Disable/enable atime updates to directories" | ||
52 | //usage: "\n [no]relatime Disable/enable atime updates relative to modification time" | ||
53 | //usage: "\n [no]dev (Dis)allow use of special device files" | ||
54 | //usage: "\n [no]exec (Dis)allow use of executable files" | ||
55 | //usage: "\n [no]suid (Dis)allow set-user-id-root programs" | ||
56 | //usage: "\n [r]shared Convert [recursively] to a shared subtree" | ||
57 | //usage: "\n [r]slave Convert [recursively] to a slave subtree" | ||
58 | //usage: "\n [r]private Convert [recursively] to a private subtree" | ||
59 | //usage: "\n [un]bindable Make mount point [un]able to be bind mounted" | ||
60 | //usage: "\n [r]bind Bind a file or directory [recursively] to another location" | ||
61 | //usage: "\n move Relocate an existing mount point" | ||
62 | //usage: ) | ||
63 | //usage: "\n remount Remount a mounted filesystem, changing flags" | ||
64 | //usage: "\n ro/rw Same as -r/-w" | ||
65 | //usage: "\n" | ||
66 | //usage: "\nThere are filesystem-specific -o flags." | ||
67 | //usage: | ||
68 | //usage:#define mount_example_usage | ||
69 | //usage: "$ mount\n" | ||
70 | //usage: "/dev/hda3 on / type minix (rw)\n" | ||
71 | //usage: "proc on /proc type proc (rw)\n" | ||
72 | //usage: "devpts on /dev/pts type devpts (rw)\n" | ||
73 | //usage: "$ mount /dev/fd0 /mnt -t msdos -o ro\n" | ||
74 | //usage: "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" | ||
75 | //usage: "$ mount cd_image.iso mydir\n" | ||
76 | //usage:#define mount_notes_usage | ||
77 | //usage: "Returns 0 for success, number of failed mounts for -a, or errno for one mount." | ||
78 | |||
19 | #include <mntent.h> | 79 | #include <mntent.h> |
20 | #include <syslog.h> | 80 | #include <syslog.h> |
21 | #include <sys/mount.h> | 81 | #include <sys/mount.h> |