Karel Zak
ca4f6229b0
lib/ismounted: basic support for loop devices
...
# losetup -a /dev/loop0
/dev/loop0: [2053]:1048578 (/home/fs-images/filesystems/ext2.img)
# findmnt /dev/loop0
TARGET SOURCE FSTYPE OPTIONS
/mnt/test /dev/loop0 ext3 rw,relatime,data=ordered
old version:
./test_ismounted /home/fs-images/filesystems/ext2.img
not mounted
new version:
./test_ismounted /home/fs-images/filesystems/ext2.img
mounted on /mnt/test
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-19 12:40:32 +01:00
Karel Zak
06f588f7d1
lib/loopdev: fix loopdev_find_by_backing_file()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-19 12:40:19 +01:00
Sami Kerola
d80081566e
docs: add missing exit value to fsck.minix(8)
...
And remove references to manual pages which has not been part of commonly
used distributions for a while.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:39:00 +01:00
Sami Kerola
65ca6f8382
minix: replace magic constants with macro names
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:38:56 +01:00
Sami Kerola
a180dc6c54
minix: use off_t, size_t, etc appropriate types
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:38:53 +01:00
Sami Kerola
1908a3c214
minix: change types in header file
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:38:51 +01:00
Sami Kerola
1342ffcbeb
tunelp: deprecation: remove command from default build
...
It is difficult to think think tunelp command being in use a lot.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:38:48 +01:00
Sami Kerola
cdd2cf46c8
more: remove unnecessary variable
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:38:46 +01:00
Sami Kerola
bb2d1ea559
isosize: inform if file does not look like iso file system
...
$ isosize /dev/urandom
isosize: /dev/urandom: might not be iso file system
-67690643227260
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:05:04 +01:00
Sami Kerola
bb7ea8d81a
isosize: fix usage() -h option print out
...
Fixes usage() bug from commit 4eba43a7
which claimed sort option for
--help being -H.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:05:02 +01:00
Sami Kerola
19b7b517b9
ipcs: add --bytes size output option
...
This makes the command being a little closer standard compliant. See
IEEE Std 1003.1 referral link below for more information.
References: http://pubs.opengroup.org/onlinepubs/009696799/utilities/ipcs.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:05:00 +01:00
Sami Kerola
56692a6701
ipcs: add --human readable size conversion option
...
Introduces new function ipc_print_size() which will call
size_to_human_string(), and handles the occasional '([k]bytes)' printing
if default size format is requested.
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:04:53 +01:00
Sami Kerola
7e3c5f1cc1
ipcs: assist debugging
...
One will be able to see enum symbols when debugging, which is not the
case when values are specified as define list.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:04:50 +01:00
Sami Kerola
a68ca3a1d2
docs: swapon.8 option name fix
...
The commit 7ae8b469ad
added option --bytes,
not the initial proposal which was changed after maillist discussion.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:04:47 +01:00
Phillip Susi
3b905b794e
partx: add update command
...
Update the kernel partition table to match what is on disk. Remove any
extra partitions and add any missing ones.
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2012-12-19 10:48:12 +01:00
Karel Zak
84ece6980e
sulogin: map NL to CR-NL on output in initial termios settings
...
(See also 9c62a2326e
agetty patch).
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-19 10:24:23 +01:00
Karel Zak
cba09b5fa8
sulogin: minor coding style changes
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-18 16:03:02 +01:00
Werner Fink
dfbc7c89b2
sulogin: add multi console feature from SysVinit sulogin
...
Now after adding Conflicts=rescue.service to getty@.service and
serial-getty@.service and Conflicts=getty.target to rescue.target
all works with `systemctl rescue'. Even adding init=/sbin/sulogin
to the kernels command line by using the `e' key in grub2 boot
menu works flawless.
This version is without the emergency code as I've this moved to
lib/console.c where it belongs to.
Signed-off-by: Werner Fink <werner@suse.de>
2012-12-18 15:53:55 +01:00
Werner Fink
ab6478ef2d
sulogin: mount temporary /dev and /proc if not found
...
This is very usefull if initrd can not loaded that is no /dev and no
/proc is found. Also if the /etc/shadow and /etc/passwd is copied into
the initrd the sulogin can be used in initrd even before /dev and/or /proc
are mounted.
Signed-off-by: Werner Fink <werner@suse.de>
2012-12-18 15:45:33 +01:00
Werner Fink
729bfb80ff
sulogin: use alarm function to indicate if a timeout occurs
...
A small change to use the alarm handler to indicate if a timeout occurs.
Signed-off-by: Werner Fink <werner@suse.de>
2012-12-18 15:08:04 +01:00
Werner Fink
b33f24b250
sulogin: make usleep() workaround work
...
Simply fix a compile problem found during debugging console.c
Signed-off-by: Werner Fink <werner@suse.de>
2012-12-18 15:07:58 +01:00
Werner Fink
cae29b3717
sulogin: use the linked lists from list.h for consoles list
...
with this the double linked list feature from util-linux is used
instead of the single linked list.
[kzak@redhat.com: use list_last_entry() and list INIT macros]
Signed-off-by: Werner Fink <werner@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-18 15:02:35 +01:00
Karel Zak
59da1544ce
include/list: add list_last_entry()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-18 15:00:03 +01:00
Karel Zak
35e52fa531
fdisk: remove crappy bugs section from man page
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-17 17:11:05 +01:00
Sami Liedes
becd09500f
include/list: fix undefined behavior in list_entry() macro
...
Update list_entry() macro, which is basically the same as the
container_of() macro in the kernel, to use offsetof() to fix undefined
behavior.
Caught using clang -fsanitize=undefined.
[kzak@redhat.com: port from e2fsprogs]
Signed-off-by: Sami Liedes <sami.liedes@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-17 16:23:35 +01:00
Karel Zak
7cdfc45f99
docs: fix typo
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-14 16:12:47 +01:00
Karel Zak
d7d58e3f8d
docs: update AUTHORS file
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-13 13:51:57 +01:00
Karel Zak
51479069e1
libmount: fix typos
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 21:02:11 +01:00
Karel Zak
dd5c22a679
blkid: fix double free [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 20:48:15 +01:00
Karel Zak
6fc8122490
libmount: make mkstemp() more robust [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 13:32:52 +01:00
Karel Zak
880f09c828
swapon: fix memmory leak [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:40:48 +01:00
Karel Zak
7317ba6d37
libblkid: check mkdir(/run/blkid) return code [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:28:34 +01:00
Karel Zak
a0e35e3044
swapon: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:18:20 +01:00
Karel Zak
76a9fcc913
prlimit: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:16:16 +01:00
Karel Zak
9d8537ff21
lscpu: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:13:38 +01:00
Karel Zak
7a591a1fb5
namei: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:12:25 +01:00
Karel Zak
0d7ebfc4a7
lslocks: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:11:17 +01:00
Karel Zak
b5fd07bcdb
lsblk: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:09:44 +01:00
Karel Zak
60b17c6f0e
findmnt: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 12:08:06 +01:00
Karel Zak
8acf2fb6e2
partx: don't care about xasprintf() return code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 11:57:40 +01:00
Karel Zak
83d02ed293
login: check lastlog lseek return code [coverity scan]
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 11:49:46 +01:00
Karel Zak
36f9133dd2
chsh: use return rather than exit in main, clean up man page
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 10:48:01 +01:00
Karel Zak
6affea028b
chfn: always use return rather than exit() in main
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 10:41:44 +01:00
Karel Zak
97da60c64e
chfn: clean up exit status
...
The old version in some cases (but not always) returns -1 (255) on
error. It seems better to cleanup the code and don't return internal
return codes by exit().
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-12 10:36:32 +01:00
Karel Zak
72c9217951
tests: unset *_DEBUG variables
...
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-10 13:43:11 +01:00
Karel Zak
cd79396704
libmount: don't use safe_getenv() for test
...
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-10 13:31:08 +01:00
Bernhard Voelker
2c0ba1ce30
libmount: avoid endless loop in mnt_get_kernel_cmdline_option
...
The above function infloops when the name to search for can only
be found at the beginning of /proc/cmdline but doesn't match,
e.g. when searching for "ro" in "root=/dev/sda1 quiet vga=0x31a".
* libmount/src/utils.c (mnt_get_kernel_cmdline_option): Replace
while by for loop to ensure the pointer p is incremented.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-12-10 13:15:19 +01:00
Karel Zak
c717b0328d
rename: use macro to print version
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-10 13:14:38 +01:00
Jan (yac) Matějka
5a2a8177f8
rename: add --symlink option for renaming symlink target
...
[kzak@redhat.com: - coding style clean up]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-10 13:07:09 +01:00
Karel Zak
8627d0159b
blkid: fix man page mess
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-10 12:25:25 +01:00