| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The commit ab025087f91b66ee8e23a16bc49eb0d9bd421d65 has disabled error
message, but unfortunately it keeps wrong return code. This has been fixed
by commit 53ae7d60cfeacd4e87bfe6fcc015b58b78ef4555.
This commit add hit about it to docs and fix regression test too.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The errno ENXIO should be ignored, unfortunately the current code uses
variable 'rc' for ioctl return code as well as for final del_parts()
return value. So, failed ioctl (which should be ignored) affects all
del_parts() status.
# modprobe scsi_debug dev_size_mb=100
# partx -d --nr 1-1024 /dev/sdc; echo $?
1
The device dos not contains any partitions, so 0 return code is
expected in this case.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1739179
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There's an obvious copy-paste error in `mnt_parse_table_line` when
referring to the 6th field of the fstab format, where it says "freq"
instead of "passno". This has probably been copied from the 5th field,
which is in fact correctly labelled as "freq".
Fix the mistake by changing the comment to say "passno" instead.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
|
|
|
|
|
|
|
| |
The <unistd.h> header is included twice in "wdctl.c". Remove one
of these includes to keep "make checkincludes" happy.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "umount -f -a -r" get stuck in a endless loop when run with a
mountinfo like below:
15 0 179:2 / / ro,relatime - ext4 /dev/root ro
16 15 0:6 / /dev rw,relatime - devtmpfs devtmpfs rw,size=242896k,nr_inodes=60724,mode=755
17 15 0:4 / /proc rw,relatime - proc proc rw
18 15 0:15 / /mnt/.psplash rw,relatime - tmpfs tmpfs rw,size=40k
19 15 0:16 / /sys rw,relatime - sysfs sysfs rw
20 19 0:7 / /sys/kernel/debug rw,relatime - debugfs debugfs rw
21 15 0:17 / /run rw,nosuid,nodev - tmpfs tmpfs rw,mode=755
22 15 0:18 / /var/volatile rw,relatime - tmpfs tmpfs rw
23 15 179:1 / /boot rw,relatime - vfat /dev/mmcblk0p1 rw,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
24 16 0:19 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
25 18 0:20 / /mnt/.psplash rw,relatime - tmpfs tmpfs rw,size=40k
The reason is that the two same mnt entry "/mnt/.psplash" will cause
the dst->tab set to NULL when umount this mnt entry the second time.
This will trigger an endless loop in mnt_reset_table() because that
mnt entry is linked on the libmnt_table but its .tab is set to NULL.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
|
|
|
|
|
|
|
|
|
| |
The test has been originally designed as usable on sparc, but now we
use it for many features which are MBR specific.
Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Co-Author: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# grep kzak /etc/passwd
kzak:x:1000:1000::/home/kzak:/bin/bash
# chfn kzak
...
grep kzak /etc/passwd
old version:
kzak:x:1000:1000:Karel Zak,,,,:/home/kzak:/bin/bash
fixed version:
kzak:x:1000:1000:Karel Zak:/home/kzak:/bin/bash
Reported-by: Filip Dvorak <fdvorak@redhat.com>
References: f723cbf544a7eac2927634f2cb6d802437a2d519
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
It is sometimes unavailable and errors on inclusion. For example, when
disabled in uClibc-ng.
|
|
|
|
|
|
|
| |
There is a c_isascii function that can be used.
isascii is deprecated and not available with some libcs like uClibc-ng
where it can be compile time disabled.
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The unnamed-field format supports partition type shortcuts:
",1MiB,L'
but for named-field format it requires full type:
(mbr) "size=1MiB,type=83"
(gpt) "size=1MiB,type=0FC63DAF-8483-4772-8E79-3D69D8477DE4"
This patch implements type shortcuts also for named-field format:
"size=1MiB,type=L"
to make it more user-friendly and unified.
Addresses: https://github.com/karelzak/util-linux/issues/837
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| | |
* 'issue832' of https://github.com/kerolasa/util-linux:
mountpoint: add --nofollow option
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The no follow option will allow user to distinct mount points from symbolic
links pointing to them. Arguably this is pretty pedantic option, mounting a
device or bind mount to a directory via symlink does not have or cause any
issues.
Addresses: https://github.com/karelzak/util-linux/issues/832
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|\ \
| | |
| | |
| | |
| | |
| | | |
* 'master' of https://github.com/chstarkd/util-linux:
removed double space
fixed mount man page typo, "bythe" -> "by the"
|
| | | |
|
| |/ |
|
|/
|
|
|
| |
Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The current code ignores single-byte non-printable characters.
Reported-by: Marc Deslauriers <marc.deslauriers@canonical.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
It's not obvious from the current docs that you have to explicitly
split command line options and wanted commands.
Addresses: https://github.com/karelzak/util-linux/issues/833
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function blkid_verify() uses private device file descriptor and
uses blkid_probe_set_device() to assign the descriptor to low-level
probing code. Unfortunately, close() in this case is not enough as the
prober can internally open whole-disk device too.
The library API has been extended so blkid_probe_set_device()
deallocates and close previously used prober for whole-disk. This new
functionality is used in blkid_verify() now.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1734545
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| | |
* '2019wk29' of https://github.com/kerolasa/util-linux:
lscpu: prefer memcpy() to manual pointer arithmetic
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With pointer arithmetic clang address sanitizer gives following error this
change addresses. Notice the following happens only when running as root.
sys-utils/lscpu-dmi.c:83:14: runtime error: load of misaligned address
0x55a1d62f3d1d for type 'const uint16_t' (aka 'const unsigned short'), which
requires 2 byte alignment
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
The following commands manifests the problem. In old versions before
commit 4762ae9d60 ("column: use libsmartcols for --table"), both of them
should output with 2 "|"
echo '||' | column -o '|' -s '|' -t
echo '|| ' | column -o '|' -s '|' -t
Fixes: 4762ae9d60 ("column: use libsmartcols for --table")
Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
| |
Addresses: https://github.com/karelzak/util-linux/issues/827
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Aim is to make dolog() a lot more readable and understandable, with downside
of when (rarely?) USE_SYSLOG it not defined the function will use a bit more
space from stack. I think that is price well worth paying.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LIBSMARTCOLS_DEBUG_PADDING=on in the next examples forces libsmartcols
print '.' as a padding char. See line "ffff" in the exmaples.
* default output is to fill all except last cell
$ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null
NAME.. ......NUM STRINGS STRINGS
aaaa.. ........0 aaaa... aaaa
bbb... ......100 bbb.... bbb
ccccc. .......21 ccccc.. ccccc
dddddd ........3 dddddd. dddddd
ee.... ......411 ee..... ee
ffff.. .....5111 .......
gggggg 678993321 gggggg. gggggg
hhh... ..7666666 hhh.... hhh
* scols_table_enable_minout() minimizes output for tailing empty cells, example:
$ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --minout --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null
NAME.. ......NUM STRINGS STRINGS
aaaa.. ........0 aaaa... aaaa
bbb... ......100 bbb.... bbb
ccccc. .......21 ccccc.. ccccc
dddddd ........3 dddddd. dddddd
ee.... ......411 ee..... ee
ffff.. .....5111
gggggg 678993321 gggggg. gggggg
hhh... ..7666666 hhh.... hhh
* cleanup up scols_table_enable_maxout() use, example:
$ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --maxout --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null
NAME.............. ..................NUM STRINGS............ STRINGS............
aaaa.............. ....................0 aaaa............... aaaa...............
bbb............... ..................100 bbb................ bbb................
ccccc............. ...................21 ccccc.............. ccccc..............
dddddd............ ....................3 dddddd............. dddddd.............
ee................ ..................411 ee................. ee.................
ffff.............. .................5111 ................... ...................
gggggg............ ............678993321 gggggg............. gggggg.............
hhh............... ..............7666666 hhh................ hhh................
Note that we cannot make scols_table_enable_minout() default because
for example "column --table" is pretty commonly used with non-blank
columns separator and in this case all cells has to be filled.
$ echo -e "aa,b,ccc\na,,\naaa,bbb,ccc" | column --table --separator ',' --output-separator '|'
aa |b |ccc
a | |
aaa|bbb|ccc
Addresses: https://github.com/karelzak/util-linux/issues/826
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
It seems pretty fragile to copy also reference counting and reference
to table list.
Addresses: https://github.com/karelzak/util-linux/pull/822
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
... to avoid misinterpretation by gtk-docs.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| | |
https://github.com/vojtechtrefny/util-linux
|
| |
| |
| |
| |
| |
| |
| | |
__copy_partition doesn't duplicate these strings which leads to
occasional double free.
Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
|
|/
|
|
|
|
|
|
| |
ProtectHome=yes makes /home inaccessible, but we need to open the
directories (mountpoints) read-only.
Addresses: https://github.com/karelzak/util-linux/issues/824
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Same as 7c643ed2855058657798d9e8e80701023de14a08.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# mkntfs -Q -F /dev/sdc
old version:
# ./blkid -p /dev/sdc
/dev/sdc: UUID="0E9E8C5F2F718479" TYPE="ntfs" USAGE="filesystem" PTTYPE="dos"
new version:
# ./blkid -p /dev/sdc
/dev/sdc: UUID="0E9E8C5F2F718479" TYPE="ntfs" USAGE="filesystem"
Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The current libfdisk MBR detection is too weak, the result is that it
reuses MBR from FAT. The correct behavior is to create a new MBR, wipe
first sector (on write) and warn about obsolete FAT superblock.
Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
Let's use standard UL_* macros to check for dependencies
(architectures and hwclock).
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add --disable-hwclock-cmos configuration argument
- Add USE_HWCLOCK_CMOS (enabled by default for i386/x86_64)
- Add define(USE_HWCLOCK_CMOS)
- Compile hwclock-cmos.c only if USE_HWCLOCK_CMOS is true
- Remove all unnecessary #ifdefs from hwclock-cmos.c
- Add #ifdef USE_HWCLOCK_CMOS around the determine_clock_access_method()
call in hwclock.c
Signed-off-by: Carlos Santos <unixmania@gmail.com>
|
|
|
|
|
| |
Addresses: https://github.com/karelzak/util-linux/issues/818
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
We need to check if referenced wholedisk defines the de-duplication
key...
Addresses: https://github.com/karelzak/util-linux/issues/819
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
We do not need all the metadata and it seems the extra padding is
problematic in some cases. Let's keep is simple and use fixed offset
for the metadata rather than sizeof().
References: https://github.com/karelzak/util-linux/pull/820
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* '2019wk27' of https://github.com/kerolasa/util-linux:
libblkid: fix address sanitizer issues
libblkid: check number of test_blkid_save arguments correctly
include/xalloc: ensure xstrdup() and xstrndup() returns nonnull attribute
libmount: fix potential null pointer dereference
libfdisk: fix variable shadowing
lib/ttyutils: avoid checking same thing twice
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With aligned attribute many blkid tests fail with following error. So
instead of aligning to 4K add padding that makes the struct same size
without causing asan trip over.
libblkid/src/superblocks/drbd.c:179:6: runtime error: member access
within misaligned address 0x55913d7e6958 for type 'struct
meta_data_on_disk_9', which requires 4096 byte alignment
In zfs structure it seems compiler is adding padding, that does not mix well
with be32_to_cpu() and other bit operations.
libblkid/src/superblocks/zfs.c:109:23: runtime error: load of misaligned
address 0x7ff6406540e4 for type 'uint32_t' (aka 'unsigned int'), which
requires 8 byte alignment
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| | |
Without this running test_blkid_save without arguments will cause a crash
when strdup() refers to none-exiting file name.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| | |
Turned out lsblk is passing null as argument to xstrdup(), so fix that and
add assert() to make sure promise of not returning null is kept in future.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is false positive warning, but lets silence it so that if and when
warnings crop up they are easy to notice and take seriously.
libmount/src/optstr.c:354:29: warning: potential null pointer dereference
[-Wnull-dereference]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|