Child processes that ended with segmentation fault previously
indicated this with return status only. The report is now more
verbose if core dump is allowed.
Improved-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
As blkid_devno_to_wholedisk returns parent dm device for
a partition mapping, the condition used in lsblk incorrectly
checked the parent-child relationship.
In this particular case, we need to process the dm partition
mapping like any other non-partition device as dm devices always
use proper holders/slaves sysfs hierarchy instead of
/sys/block/<parent>/<name> that is used for real partitions.
Example (test1 is a partition mapping and sdb1 is a real partition):
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 128M 0 disk
`-test (dm-0) 253:0 0 128M 0 dm
`-test1 (dm-1) 253:1 0 127M 0 part
sdb 8:16 0 128M 0 disk
`-sdb1 8:17 0 127M 0 disk
Before this patch (test1 skipped!):
$ lsblk -s /dev/mapper/test1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
test (dm-0) 253:0 0 128M 0 dm
`-sda 8:0 0 128M 0 disk
$ lsblk -s /dev/sdb1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb1 8:17 0 127M 0 disk
`-sdb 8:16 0 128M 0 disk
With this patch (test1 processed correctly):
$ lsblk -s /dev/mapper/test1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
test1 (dm-1) 253:1 0 127M 0 part
`-test (dm-0) 253:0 0 128M 0 dm
`-sda 8:0 0 128M 0 disk
$ lsblk -s /dev/sdb1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb1 8:17 0 127M 0 disk
`-sdb 8:16 0 128M 0 disk
Partitions mapped by device-mapper are not like real partitions where
there's a /sys/block/<parent>/<name>/dev sysfs path. We need to look
at /sys/block/<name>/dev like we do for any other non-partition devices.
The mapped partition is not found otherwise.
For example, this bug shows up in lsblk while specifying a device
on command line while that device is a dm mapping over a partition:
$lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 128M 0 disk
`-test (dm-0) 253:0 0 128M 0 dm
`-test1 (dm-1) 253:1 0 127M 0 part
Before this patch:
$lsblk /dev/mapper/test1
lsblk: dm-1: unknown device name
With this patch:
$lsblk /dev/mapper/test1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
test1 (dm-1) 253:1 0 127M 0 part
If `setterm -dump` fails because of lack of permission to read
/dev/vcsa, it should not report that it couldn't read /dev/vcsa0.
This could be misleading if there is only /dev/vcsa, but not /dev/vcsa0.
Before:
$ ./setterm -dump
setterm: Couldn't read /dev/vcsa0
After:
$ ./setterm -dump
setterm: Couldn't read neither /dev/vcsa0 nor /dev/vcsa
(Note: /dev/vcsa0 does not exist and the user does not have read
permission on /dev/vcsa in this case).
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=780615
Reported-by: Christopher Yeleighton <giecrilj@stegny.2a.pl>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
The proper specifier for size_t is %zu. %lu will work fine on 64-bit
architectures but not on 32-bit.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
A sideeffect of 839be2ba6b is that we now
warp the systemtime according to the timezone, on the first call of
--systz. This is not always the correct thing to do, and causes a
regression for us in Arch Linux.
The behavior is correct if the RTC, and hence the systemtime, is
in localtime. However, if the systemtime is already in UTC we don't
want to touch it when we set the kernel timezone (which we still need to
do as some filesystems use this information).
An almost identical issue was also fixed in systemd commit
72edcff5db936e54cfc322d9392ec46e2428fd9b.
Signed-off-by: Tom Gundersen <teg@jklm.no>
On Sun, Sep 16, 2012 at 02:11:48PM +0800, Queen Adam wrote:
> I'm using Archlinux ARM for my Melo A100 box.
> The hwclock always timeout when using select() in rtc.c.
>
> After I change the timeout from 5 to 10, the problem is solved.
>
> In fact the timeout in my ARM box seems only to be a little larger
> than 5s.
Signed-off-by: Karel Zak <kzak@redhat.com>
The loop option is optional, mount(8) is able to detect that the
source path is regular file (image) with known filesystem -- then a
loop device is automatically created. In this case we have to store
"loop" option to mtab on systems without autoclear loopdev flag.
Signed-off-by: Karel Zak <kzak@redhat.com>
Disable an alarm use the same logic used to enable it: first try RTC_WKALM_SET
with the "enabled" flag set to false, if it fails fall back to RTC_AIE_OFF.
Signed-off-by: Giacomo <giacomo.perale@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
The original mount(8) allows to store arbitrary user= option to mtab
file if called by root user. For example:
# mount -f foo /bar -t xxx -o rw,user=kzak
the new mount removes the 'user=' and 'users' options at all for root
user. This is regression. The original functionality is necessary by
'sshfs' where fuse writes to mtab file by mount(8).
Reported-by: Juergen Daubert <jue@jue.li> (and 'horrorStruck' on IRC)
Signed-off-by: Karel Zak <kzak@redhat.com>
kernel cryptoloop is deprecated since ages and support for cryptoloop
in util-linux is incomplete/broken.
- no password hashing
- last 8 bit of key are always set to zero
- no binary keys possible (stops reading key at \n and \0)
In the past some Distros added the above features with patches. So
remove cryptoloop support from util-linux completely to make sure
people won't try using it.
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
It's impossible to compile static when gcc/ld is forced to
use GNU_RELRO and BIND_NOW for suid binaries (e.g. mount).
Signed-off-by: Karel Zak <kzak@redhat.com>
The libblkid library was intended to be released under the LGPL.
There is very little significant code in version.c; just a version
parser, and the original copyright holder (Theodore Ts'o,
tytso@mit.edu) has confirmed that he had intended to relicense all of
the files under the LGPL during a time when he was the sole author.
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: John Calcote <john.calcote@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
The new option imitates adjtimex -c functionality and outputs
the drift in 10 second intervals.
[kzak@redhat.com: - coding style
- print hw and system time columns too]
Signed-off-by: Karel Zak <kzak@redhat.com>
Let's support GNU Hurd over-engineering where a process can exist
without UID and getuid() returns -1 and sets errno.
Signed-off-by: Karel Zak <kzak@redhat.com>