sin
1392fce27a
Don't prefix error messages with the program name
...
Do not escape error codes/error messages for no reason.
2014-04-11 23:47:28 +01:00
sin
f308a58740
Error out if dup2 doesn't return the fd we want
2014-04-10 11:21:44 +01:00
Hiltjo Posthuma
dfc2f7edac
rmmod: fix segfault if '.' is not found
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-06 12:51:31 +01:00
Hiltjo Posthuma
acdac11285
mount: style for loop in catfile()
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-05 18:56:08 +01:00
Hiltjo Posthuma
ef1ab48699
mount: loop until no opt options
...
values can be specified as 0 to ignore them
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-05 18:55:56 +01:00
Hiltjo Posthuma
3c47a9a9d6
mount: rename bufsiz to datasiz for clarity
...
datasiz relates to the size of data
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-04 20:09:44 +01:00
Hiltjo Posthuma
5f4d18d4fa
mount: cat /proc/mounts if no arguments given
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-04 20:09:37 +01:00
Hiltjo Posthuma
e71d009bd1
mount: add defaults option, it does nothing
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-04 20:09:26 +01:00
Hiltjo Posthuma
bbf3b5ac85
stat: implement -t (terse mode)
...
mostly compatible with coreutils and busybox. file mode is intentionally not compatible though.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-04 20:09:17 +01:00
Hiltjo Posthuma
139522b45e
stat: declare initial functions to use at the top
...
remove Lflag. this will be more clear for terse format later on aswell.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-04 20:09:04 +01:00
sin
6529caebe2
Update README
2014-03-31 12:22:15 +01:00
sin
82c99b16a7
Be consistent and use #ifdef instead of #if
2014-03-28 16:00:43 +00:00
sin
21e708abd4
Prefix error/warning messages with program name if DEBUG is defined
2014-03-28 15:56:02 +00:00
sin
07592f31be
Print system login processes correctly when doing who -l
...
Fix style as well.
2014-03-25 12:44:07 +00:00
Hiltjo Posthuma
9031fcfd29
mount: mounted(): dont exit on non-fatal things
...
this fixes mount -a. proceed iterating fstab entries even if an error occurs with some entry.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-22 22:18:52 +00:00
Hiltjo Posthuma
f1a747a0ca
mount: use simple error status codes for now
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-22 22:18:37 +00:00
sin
6505db4709
Don't print errors for already mounted filesystems
2014-03-18 14:46:35 +00:00
sin
d06158ccf9
Use /proc/mounts instead of /etc/mtab
...
Let the kernel keep track of mounted filesystems, no need to use
/etc/mtab as we are not modifying it.
2014-03-18 14:29:14 +00:00
sin
ee88227c33
Don't list dummy rootfs by default
2014-03-18 14:20:58 +00:00
sin
7cd9280b11
Remove implemented items from TODO
2014-03-17 12:55:41 +00:00
sin
e91b3d9e71
Fix indentation for mount(8)
...
No functional change intended.
2014-03-17 12:49:05 +00:00
sin
4fb9eabf8e
Implement -o for killall5
2014-03-17 12:29:34 +00:00
Hiltjo Posthuma
55fa13016c
mount: only use source if not set
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-16 04:04:10 +00:00
sin
df9e438843
Only complain for a missing /etc/fstab
...
Avoids complaining for /proc/mounts while mounting procfs.
2014-03-15 19:30:43 +00:00
Hiltjo Posthuma
023c8e0414
mount: use mount error status code when mount failed
...
this matches other mount implementations
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 19:30:20 +00:00
Hiltjo Posthuma
bd994c3a50
mount: fix bug where target mountpoint would not be used
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 19:30:03 +00:00
Hiltjo Posthuma
a056e2aa54
mount: match mountpoint error message with util-linux
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 19:29:40 +00:00
Hiltjo Posthuma
9af24d8a29
mount: show devicename in error output for clarity
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 19:29:21 +00:00
sin
861e16ac17
Check strdup() for failure
2014-03-15 18:49:38 +00:00
sin
6ef8c718e1
umount -a should unmount in the reverse order
2014-03-15 18:49:33 +00:00
sin
98f7fcad94
Factor out umount -a into a separate function
2014-03-15 18:49:27 +00:00
sin
e5b9f69626
Print mnt_dir as well if umount2 fails.
2014-03-15 18:49:15 +00:00
Hiltjo Posthuma
7569fd3805
mount: match on source rule too if argument is set
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 17:52:10 +00:00
Hiltjo Posthuma
5b5cb8447e
mount: if no options flag given, use matched mount rule options
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 17:52:02 +00:00
Hiltjo Posthuma
781cf0ed52
mount: implement some error status codes for mount -a
...
see mount man page:
32: all failed.
64: some failed.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 17:51:46 +00:00
Hiltjo Posthuma
c444139aea
mount: just set data empty in declaration
...
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-15 17:51:32 +00:00
sin
6c926cd1d4
Use weprintf() instead of fprintf() for mount(8)
2014-03-15 14:01:59 +00:00
Hiltjo Posthuma
35e3f401ab
Major mount(8) refactor
2014-03-15 13:27:02 +00:00
sin
14716af472
Don't umount proc in umount -a
2014-03-12 14:40:03 +00:00
sin
bea831d2e6
umount(8) should look in /etc/mtab
2014-03-12 14:39:52 +00:00
sin
552a5ae4b5
Don't prefix messages with the tool name by default
2014-03-12 14:39:42 +00:00
sin
6506e85d13
Update umount usage
2014-03-12 14:39:31 +00:00
sin
38bda0c783
Replace perror() with weprintf()
2014-03-12 14:23:27 +00:00
sin
6df1301594
Add weprintf()
2014-03-12 14:23:19 +00:00
sin
f7a4849ded
No need to have ':' in perror()
...
It gets added automatically.
2014-03-11 19:47:09 +00:00
sin
e6375453b1
Set ret to EXIT_FAILURE if umount2() actually fails
2014-03-11 19:47:09 +00:00
sin
7f92db7327
Implement umount -a
2014-03-11 19:47:08 +00:00
sin
4879ea07b4
Implement mount -a
...
This code needs refactoring.
2014-03-11 19:47:08 +00:00
sin
a3e437c7ef
Fix style issue
2014-03-06 15:09:11 +00:00
sin
a32345028e
Add initial version of killall5(8)
2014-03-06 12:13:49 +00:00