- Sep 20, 2017
-
-
Andreas Henriksson authored
Someone requested explicitly mentioning how tabs are escaped, in addition to the already existing spaces example. Addresses: https://bugs.debian.org/580047 Signed-off-by:
Andreas Henriksson <andreas@fatal.se>
-
Sami Kerola authored
This removes bogus write failed warning. $ wdctl wdctl: write failed: Invalid argument Device: /dev/watchdog [...] Signed-off-by:
Sami Kerola <kerolasa@iki.fi>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
It seems that on some systems (e.g. RHEL7) the libc function getaddrinfo() is not able to translate ::ffff: address to IPv4. The result is 0.0.0.0 host address in the last(1) and utmpdump(1) output. /sbin/login -h "::ffff:192.168.1.7" utmpdump: [7] [03926] [1 ] [user1 ] [pts/1 ] [::ffff:192.168.1.7 ] [0.0.0.0 ] [Thu May 12 17:49:50 2016 ] Not sure if this is about order of the getaddrinfo() results, system configuration or libc version. It's irrelevant for login(1). We have to be robust enough to write usable address to log files everywhere. The solution is to detect IPv4-mapping-to-IPv6 and use IPv4 for utmp. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1296233 Signed-off-by:
Karel Zak <kzak@redhat.com>
-
- Jul 20, 2017
-
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Rafael Fontenelle authored
-
Joe Hansen authored
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Carlos Santos authored
Commit 4762ae9d removed mtsafe_strtok() but left behind calls to wcstok and wcspbrk. This leads to build failures when libc does not have the wide-character functions, like some uClibc builds. Solve the problem by using strtok_r and strpbrk when HAVE_WIDECHAR is not defined. Fixes: http://autobuild.buildroot.net/results/fd8a1a8e0cef3aeed9588540e8e663664f6b43aa http://autobuild.buildroot.net/results/5ad73ea8b471321988c50d80a5e50d4504151dd6 http://autobuild.buildroot.net/results/04411b7280dc51ecd51236967981a42352bbeb3e Signed-off-by:
Carlos Santos <casantos@datacom.ind.br>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
- Jul 18, 2017
-
-
Ivan Delalande authored
Assume that /proc is not mounted instead of returning an error when we are unable to open the mounts and mountinfo files in /proc. Also set cxt->mtab back to NULL so that it gets properly parsed when we check if the next filesystem is mounted. The goal is to have mount -a work when /proc is not mounted, typically with /proc on the first line of fstab. Signed-off-by:
Ivan Delalande <colona@arista.com>
-
- Jul 17, 2017
-
-
Karel Zak authored
For some reason kernel commit e980f62353c697cbf0c4325e43df6e44399aeb64 add extra warning when the ioctl is used for DM devices. It seems we can avoid this ioctl when the device has dm/uuid. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1469532 Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
The commit 8ffa3b65 has fixed PMBR CHS addresses initialization to be more close to UEFI standard. -000001c0 01 00 ee fe ff ff 01 00 00 00 ff 8f 01 00 00 00 +000001c0 02 00 ee ff ff ff 01 00 00 00 ff 8f 01 00 00 00 Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
The PMBR partition record should be StartingCHS=0x002000 (0/0/2) and EndingCHS=0xFFFFFF (1023/255/63) Addresses: https://github.com/karelzak/util-linux/issues/485 Signed-off-by:
Karel Zak <kzak@redhat.com>
-
- Jul 14, 2017
-
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
- Jun 23, 2017
-
-
Ivan Delalande authored
As buf is passed as a signed char buffer in fwrite_hex, fprintf will print every byte from 0x80 as a signed-extended int causing each of these bytes to be printed as "\xffffff80" and such, which can be pretty confusing. Force fprintf to use the argument as a char to make it print only 2 digits, e.g. "\x80". Signed-off-by:
Ivan Delalande <colona@arista.com>
-
Karel Zak authored
The current behavior is to report error and continue, it seems strange: # blockdev --setro /dev/sdc # wipefs -a /dev/sdc wipefs: /dev/sdc: failed to erase xfs magic string at offset 0x00000000: Operation not permitted /dev/sdc: 4 bytes were erased at offset 0x00000000 (xfs): 58 46 53 42 ^^^^^^^^^^^ not true The patch calls err() to exit. Reported-by:
Vratislav Podzimek <vpodzime@redhat.com> Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Addresses: https://github.com/karelzak/util-linux/issues/464 Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Alex Ivanov authored
fstrim --all is broken in a way that if there is a bind mount for some filesystem, that filesystem will not be trimmed. This is especially critical for e.g. NixOS distribution, which needs bind mount within root fs: https://github.com/NixOS/nixos/blob/master/modules/system/boot/stage-2-init.sh#L55 Currently for a given filesystem during "de-duplication by source and root" phase, an early mounted fs path is filtered (e.g. "/"), while later mounted fs path is kept (e.g. "/nix/store") though anyway discarded later (since it's an overlaying mount). This leads to skipped trimming. So flip this behaviour. Should also help for other types of overlaying mounts. Reference: https://github.com/karelzak/util-linux/blob/stable/v2.29/libmount/src/tab.c#L715 Signed-off-by:
Alex Ivanov <yourbestfriend@openmailbox.org>
-
Pali Rohár authored
$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-4.img bs=1M count=10 $ mkudffs -l Label -b 1024 udf-hdd-mkudffs-1.3-4.img $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-5.img bs=1M count=10 $ mkudffs -l Label -b 4096 udf-hdd-mkudffs-1.3-5.img
-
Pali Rohár authored
When detecting block size of UDF filesystem, try to use also block size 512, 1024, 2048 and 4096. This would allow blkid to detect UDF filesystem in image file created from 4K hard disk (which should have UDF block size 4096). Before this patch only UDF images with block size of 512 and 2048 were detected as only block size from blkid_probe_get_sectorsize() and 2048 were used (blkid_probe_get_sectorsize() returns for disk images 512).
-
Ruediger Meier authored
COLUMNS is automatically set by bash and may result in stupid errors like fincore: unknown column: 160 Signed-off-by:
Ruediger Meier <ruediger.meier@ga-group.nl>
-
Karel Zak authored
Michal wrote: There is weird mix of logic in lscpu-dmi.c which sometimes returns 0 and sometimes -1 on error. Since most checks are if (rc) goto done; this bails out early on error skipping some detection methods. Further, in lscpu.c all following detections are guarder by if(hyper) so returning -1 causes all following methods to be skipped. Reported-by:
Michal Suchanek <msuchanek@suse.de> Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Zac Medico authored
Fixes a segfault observed with python3.6.
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
NeilBrown authored
It is currently not possible to reliably and automatically unmount an NFS filesystem. If the server is not available, the umount command will hang. The hang can be avoided by using "-l" or "-f", but neither of these are appropriate for automatic use such as by an automounter (e.g automountd or systemd). "-l" will unmount even if the filesystem is in use, which an automounter generally doesn't want. If the filesystem is in use, then the umount should fail. "-f" can cause the filesystem to abort pending transactions which might break filesystem semantics. This can be useful in the hands of a sysadmin, but not when used by an automatic tool. umount has another option, "-c" aka "--no-canonicalize" which avoids some "stat" calls. Currently this doesn't avoid all calls to canonicalize_path() as mnt_context_prepare_umount() -> lookup_umount_fs() -> mnt_context_find_umount_fs() -> mnt_context_get_mtab_for_target() -> mnt_resolve_path() -> canonicalize_path_and_cache() -> canonicalize_path() leads to that function being called. The "-c" option could be taken to mean "I know what I'm doing, this really is the path to a mount point, I just want you to unmount it". Given that, it seems suitable to extend this to avoid all 'stat' calls on the mountpoint. It is already appropriate for any automount program to pass "-c" to "umount", so they can be changed to do so at any time. With the patch below, "-c" will result in the mountpoint never being "stat"ed, so umount won't hang on an inaccessible server. This isn't quite sufficient, for NFS at least, as the usage of libmount in umount.nfs still calls 'stat' on the mount point. "-c" isn't passed to the umount helper, but it is reasonable for such helpers to assume "-c" because "umount" will have canonicalized the path when that is appropriate. So, this patch treats "-c" much like "-l" and "-f" when deciding whether it is safe to 'stat' the path. Signed-off-by:
NeilBrown <neilb@suse.com>
-
Jakub Wilk authored
Before: Formatting ... done1 After: Formatting ... done Signed-off-by:
Jakub Wilk <jwilk@jwilk.net>
-
Karel Zak authored
agetty refresh prompt (/etc/issue file etc.) when requested by inotify or netlink. For this purpose we monitor some file descriptors by select(). The terminal input file descriptor is switched to non-canonical mode before select(). The goal is to be informed about user activity before new-line. The FD is immediately switched back to canonical mode when activity is detected. The side effect is that all not-read-yet chars in the input buffer are lost ... so we need to call read() before switch to canonical mode to save the chars. The original implementation has been based on TIOCSTI ioctl. It returns already read chars back to the terminal input buffer to make them useful for canonical mode. The problem was race (agetty writes to input buffer in the same time as user) and result was reordered chars in login name... so useless. This issue has been later fixed by extra buffer (commit 790119b8) for already read data. And TIOCSTI ioctl has been removed. Unfortunately this solution is also wrong, because the buffer is maintained only by agetty and inaccessible for terminal when user edit (by DEL/CTRL^U) login name in canonical mode. The solution is simple -- just don't try to be smart and keep terminal in canonical mode all time (so terminal controls DEL, CTRL^U, etc) and flush input buffer (=discard unread data) and ask user for login name again after prompt reload. The agetty reload is very rarely situation and for user it's pretty obvious that he has to type login name again (as all terminal has been clear+redraw). Addresses: https://github.com/karelzak/util-linux/issues/454 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1464148 Signed-off-by:
Karel Zak <kzak@redhat.com>
-
- Jun 22, 2017
-
-
Karel Zak authored
This stupid bug has been introduced by e1cfb304 (v2.30) and it disables to create extended partition by cfdisk :-( Signed-off-by:
Karel Zak <kzak@redhat.com>
-
- Jun 02, 2017
-
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
The libtinfo is enough (and libncurses optional for cal). Signed-off-by:
Karel Zak <kzak@redhat.com>
-
Karel Zak authored
Signed-off-by:
Karel Zak <kzak@redhat.com>
-