]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Karel Zak [Tue, 3 Jul 2018 11:55:32 +0000 (13:55 +0200)]
Merge branch 'fixes' of https://github.com/rudimeier/util-linux
* 'fixes' of https://github.com/rudimeier/util-linux:
wipefs: add missing ifdef
lib/path: remove unused expression
ipcs,chmem: fix access() usage
Karel Zak [Tue, 3 Jul 2018 11:51:51 +0000 (13:51 +0200)]
fallocate: add man page note about --collapse-range granularity
Reported-by: Radka Skvarilova <rskvaril@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Harry Mallon [Mon, 25 Jun 2018 15:19:18 +0000 (16:19 +0100)]
libblkid: Add very basic APFS recognition
Ruediger Meier [Mon, 25 Jun 2018 13:08:55 +0000 (15:08 +0200)]
wipefs: add missing ifdef
Seen on OSX:
misc-utils/wipefs.c:822:5: warning: implicit declaration of function 'rereadpt' is invalid in C99 [-Wimplicit-function-declaration]
rereadpt(fd, devname);
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Mon, 25 Jun 2018 12:23:42 +0000 (14:23 +0200)]
lib/path: remove unused expression
error: expression result unused [-Werror,-Wunused-value]
prefix = optarg, "failed to parse range start";
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Mon, 25 Jun 2018 12:01:21 +0000 (14:01 +0200)]
ipcs,chmem: fix access() usage
Some mistakes happened lately when switching from path_exist()
to ul_path_access(). See
f09a98de and
8ca31279 .
This caused ipcs test failures when running i386 binaries on x86_64
hosts, because the syscall fallback was always used. That's why I
reviewed all similar changes and found another one in chmem.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
osexp2000 [Mon, 25 Jun 2018 01:34:31 +0000 (10:34 +0900)]
exec_shell: prevent ".: applet not found" error when SHELL env is not set.
When SHELL env is not set, it cause xstrdup(NULL) be executed, and result in weird error message ".: applet not found" instead of /bin/sh being used.
Karel Zak [Fri, 22 Jun 2018 10:47:25 +0000 (12:47 +0200)]
docs: update TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 21 Jun 2018 12:24:01 +0000 (14:24 +0200)]
include/path: make sure PATH_MAX is defined
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 21 Jun 2018 12:01:54 +0000 (14:01 +0200)]
Merge branch 'more' of https://github.com/kerolasa/util-linux
* 'more' of https://github.com/kerolasa/util-linux:
more: remove function like preprocessor defines
more: remove global variables, add struct more_control
more: move couple functions
Karel Zak [Thu, 21 Jun 2018 11:46:20 +0000 (13:46 +0200)]
choom: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 21 Jun 2018 11:49:03 +0000 (13:49 +0200)]
lib/path: allow dir-path formatting
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 20 Jun 2018 14:43:19 +0000 (16:43 +0200)]
tests: add simple LVM lsblk dump
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 20 Jun 2018 14:41:51 +0000 (16:41 +0200)]
lsblk: fix ul_path_read_string() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 20 Jun 2018 14:32:56 +0000 (16:32 +0200)]
tests: add simple ATA and NVME lsblk dump
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 20 Jun 2018 10:59:40 +0000 (12:59 +0200)]
tests: add lsblk test script
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 20 Jun 2018 10:58:19 +0000 (12:58 +0200)]
lsblk: fix COL_SCHED
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Jun 2018 15:00:14 +0000 (17:00 +0200)]
tests: add simple & stupid script to generate lsblk /sys and /proc dump
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Jun 2018 14:30:29 +0000 (16:30 +0200)]
lsblk: document --sysroot
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Jun 2018 14:10:17 +0000 (16:10 +0200)]
lsblk: fix sysfs_devno_to_devname() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Jun 2018 10:22:59 +0000 (12:22 +0200)]
lsblk: follow --sysroot when read mountpoints
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Jun 2018 10:02:52 +0000 (12:02 +0200)]
lsblk: use prefix for DM name
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 18 Jun 2018 11:01:27 +0000 (13:01 +0200)]
lsblk: add --sysroot
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 15 Jun 2018 10:07:10 +0000 (12:07 +0200)]
docs: add note about lsblk to TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 15 Jun 2018 09:59:29 +0000 (11:59 +0200)]
lsblk: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 15 Jun 2018 09:57:48 +0000 (11:57 +0200)]
lib/sysfs: cleanup function names
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 30 May 2018 09:24:40 +0000 (11:24 +0200)]
blockdev: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 30 May 2018 08:47:09 +0000 (10:47 +0200)]
partx: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 30 May 2018 08:41:46 +0000 (10:41 +0200)]
resizepart: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 29 May 2018 10:59:03 +0000 (12:59 +0200)]
blkzone: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 29 May 2018 10:53:52 +0000 (12:53 +0200)]
fstrim: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 29 May 2018 10:41:48 +0000 (12:41 +0200)]
lib/path: improve debug message on redirect
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 29 May 2018 10:39:32 +0000 (12:39 +0200)]
fstrim: add --dry-run
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 29 May 2018 10:10:31 +0000 (12:10 +0200)]
fstrim: use new ul_path_* API, improve sysfs context usage
* improve has_discard() function to initialize sysfs context only once
* use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 29 May 2018 10:09:56 +0000 (12:09 +0200)]
lib/sysfs: fix sysfs_blkdev_get_wholedisk()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 25 May 2018 11:20:22 +0000 (13:20 +0200)]
lib/path: simplify debug message
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 25 May 2018 10:51:55 +0000 (12:51 +0200)]
lscpu: use new ul_path_* API
* use ul_path_* API for /sys/devices/system/cpu paths
* use ul_path_* API for /proc
* rename is_compatible() to is_devtree_compatible() as it works
with the devices tree only
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 25 May 2018 10:47:06 +0000 (12:47 +0200)]
lib/path: add ul_prefix_fopen(), improve cpuset funcs
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 24 May 2018 12:06:11 +0000 (14:06 +0200)]
lib/path: don't use extra '/'
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 24 May 2018 11:50:52 +0000 (13:50 +0200)]
ipcs: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 May 2018 10:33:03 +0000 (12:33 +0200)]
lib/path: add more debug messages
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 May 2018 10:32:52 +0000 (12:32 +0200)]
chcpu: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 May 2018 14:26:07 +0000 (16:26 +0200)]
ctrlaltdel: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 May 2018 14:25:47 +0000 (16:25 +0200)]
lib/path: make ul_path_read_ usable with NULL handler
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 May 2018 14:05:39 +0000 (16:05 +0200)]
rfkill: don't use lib/path
It seems like crazy overkill for this trivial purpose.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 May 2018 12:45:23 +0000 (14:45 +0200)]
chmem: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 May 2018 12:45:23 +0000 (14:45 +0200)]
lsmem: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 May 2018 13:42:37 +0000 (15:42 +0200)]
lib/path: add ul_path_read_buffer()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 17 May 2018 11:58:30 +0000 (13:58 +0200)]
lib/path: add ul_path_get_abspath()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 May 2018 12:08:11 +0000 (14:08 +0200)]
zramctl: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 May 2018 12:06:02 +0000 (14:06 +0200)]
lib/sysfs: fix ul_path_read_string() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 May 2018 11:22:38 +0000 (13:22 +0200)]
libfdisk: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 May 2018 11:20:39 +0000 (13:20 +0200)]
libblkid: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 May 2018 11:20:01 +0000 (13:20 +0200)]
lib/sysfs: add sysfs_blkdev_get_parent()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 May 2018 10:52:47 +0000 (12:52 +0200)]
lib/sysfs: make possible to call sysfs_blkdev_deinit_path() in loop
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 May 2018 12:11:38 +0000 (14:11 +0200)]
lib/path: fix read string to be backwardly compatible
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 May 2018 11:43:29 +0000 (13:43 +0200)]
lib/path lib/sysfs: add debug
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 May 2018 11:21:41 +0000 (13:21 +0200)]
lib/loopdev: remove obsolete macro
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 May 2018 11:08:47 +0000 (13:08 +0200)]
lib/loopdev: use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 15 May 2018 11:08:18 +0000 (13:08 +0200)]
lib/sysfs: add ul_new_sysfs_path() shortcut
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 11 May 2018 12:28:03 +0000 (14:28 +0200)]
lib/sysfs: new implementation
* reuse ul_path_* API
* allow to use prefix for sysfs paths, so we can use snapshots from
sysfs for regression tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 9 May 2018 13:54:12 +0000 (15:54 +0200)]
lib/path: new implementation
The goal is to avoid duplicate code in path.c and sysfs.c and make it
possible to define prefix for paths for all sysfs and procfs based
utils. Now we have /proc snapshots (for tests) for lscpu only. It
would be nice to have the same (for sysfs) for lsblk and another tools.
* very simple API to read numbers, strings and symlinks
* based on openat()
pc = ul_new_path("/sys/block/sda");
ul_path_read_u64(pc, &size, "size");
ul_path_read_u64(pc, &lsz, "queue/logical_block_size");
* printf-like API to generate paths, for example:
ul_path_readf_u64(pc, &num, "sda%d/size", partno)
* allow to define prefix to redirect hardcoded paths to another
location, for example:
pc = ul_new_path("/sys/block/sda");
ul_path_set_prefix(pc, "/my/regression/dump");
ul_path_read_u64(pc, &num, "size");
to read /my/regression/dump/sys/block/sda/size
* allow to extend the API by "dialects", for example for sysfs:
pc = ul_new_path(NULL);
sysfs_blkdev_init_path(pc, devno, NULL);
and use ul_path_* functions to read from @pc initialized by
sysfs_blkdev_init_path()
* add test_path binary
Signed-off-by: Karel Zak <kzak@redhat.com>
Milan Broz [Tue, 19 Jun 2018 10:33:20 +0000 (12:33 +0200)]
lsblk: add partition table UUID and type fields.
This patch adds PTUUID and PTTYPE fields to lsblk, that are corresponding
fields to ID_PART_TABLE_UUID and ID_PART_TABLE_TYPE in udev database.
[kzak@redhat.com: - small change in PTUUID description]
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Sat, 26 May 2018 08:37:47 +0000 (09:37 +0100)]
more: remove function like preprocessor defines
Inlining code using preprocessor function like macros is bad for
readability, and prone to errors. Besides this is a pager, who cares if
code is few milliseconds slower.
Requestee-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Sami Kerola [Wed, 23 May 2018 21:58:34 +0000 (22:58 +0100)]
more: remove global variables, add struct more_control
This is rather big change, but that is the only way to do this sort job. To
keep this change relatively understandable only moves global variables to a
state structure.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Sami Kerola [Wed, 23 May 2018 20:54:42 +0000 (21:54 +0100)]
more: move couple functions
Earlier commit moved lots of functions to work without declarations, but to
be able to get rid of global variables few more moves is needed.
Reference:
a8f98304e6d2f4627ca31f6c661934c92b1095f7
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Andreas Henriksson [Sun, 17 Jun 2018 12:49:15 +0000 (14:49 +0200)]
partx: exit with error code when partition read failed
Make sure partx exits with a non-0 return code when
it runs into either code-path where getting the partition
table failed (or wasn't even attempted because of previous
error condition).
Change was tested using:
touch /tmp/foobar
partx -s - /tmp/foobar
Previously that was only printing an error/warning message
and then exiting with 0, but after this change it exits
with 1.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Reported-by: Juan Céspedes <cespedes@debian.org>
Addresses: https://bugs.debian.org/898426
Karel Zak [Thu, 14 Jun 2018 11:02:49 +0000 (13:02 +0200)]
setarch: add another PER_LINUX32 aliases for ppcle
The big-endian version maps generic "ppc" and "ppc32" aliases to
PER_LINUX32. It seems that we can do the same for little-endian.
Note that SYS_personality does not care about LE/BE, it's 32 or 64 bit.
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Tue, 12 Jun 2018 12:26:03 +0000 (14:26 +0200)]
Merge branch 'hardlink-import' into hardlink
Import hardlink source and manpage version 1.3 from
https://pagure.io/hardlink.git
revision
24da8615f7a9c67648bfe9b6709ba7786d61b89a
Kevin Fenzi [Sun, 17 Sep 2017 21:07:42 +0000 (14:07 -0700)]
fixes for the fixes
Signed-off-by: Francisco Javier Tsao Santín <tsao@gpul.org>
Francisco Javier Tsao Santín [Tue, 17 Oct 2017 21:21:36 +0000 (23:21 +0200)]
temporal fix before re-patch (updates from Fedora repo)
utoddl [Mon, 14 Aug 2017 14:46:25 +0000 (14:46 +0000)]
Update hardlink.1
The example regex in the BUGS section needs its backslashes backslashed.
Francisco Javier Tsao Santín [Sun, 23 Apr 2017 22:06:03 +0000 (00:06 +0200)]
Fixed version number, added changelog about Todd Lewis' patch
Todd Lewis [Tue, 28 Mar 2017 19:16:56 +0000 (15:16 -0400)]
exclude files via pcre
Francisco Javier Tsao Santín [Thu, 16 Feb 2017 19:08:40 +0000 (20:08 +0100)]
Fixed 32 bit build with gcc7 (RH Bugzilla ID
1422989 )
Francisco Javier Tsao Santín [Sun, 10 Jul 2016 02:12:06 +0000 (04:12 +0200)]
spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); update FSF address at .c source file
Francisco Javier Tsao Santín [Sun, 10 Jul 2016 02:03:41 +0000 (04:03 +0200)]
Revert "spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file"
This reverts commit
bb9e76ae339794c2243ae294207942b7ea278364 .
Francisco Javier Tsao Santín [Sun, 10 Jul 2016 01:57:43 +0000 (03:57 +0200)]
spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file
Jan Zeleny [Wed, 10 Apr 2013 12:47:17 +0000 (14:47 +0200)]
Mention -f option in the man page
Jindrich Novy [Sun, 15 Apr 2012 09:22:10 +0000 (11:22 +0200)]
do not allow to hardlink files across filesystems by default (#786719)
(use -f option to override)
Jindrich Novy [Fri, 21 Oct 2011 00:49:08 +0000 (02:49 +0200)]
fix possible buffer overflows, integer overflows, update man page
Jindrich Novy [Thu, 3 Mar 2011 11:15:33 +0000 (12:15 +0100)]
fix URL and remove mmap() (#676962, #672917)
Jindrich Novy [Sun, 29 Oct 2006 07:19:35 +0000 (07:19 +0000)]
- update docs to describe highest verbosity -vv option (#210816)
- use dist Resolves: 210816
Jindrich Novy [Mon, 14 Nov 2005 08:31:25 +0000 (08:31 +0000)]
mostly spec cleanup
Jindrich Novy [Mon, 7 Nov 2005 14:07:33 +0000 (14:07 +0000)]
add -h option
Dave Jones [Fri, 26 Aug 2005 04:42:38 +0000 (04:42 +0000)]
Document hardlink command line options. (Ville Skytta) (#161738)
Jeremy Katz [Wed, 27 Apr 2005 22:05:13 +0000 (22:05 +0000)]
- don't try to hardlink 0 byte files (#154404)
Dave Jones [Wed, 9 Feb 2005 23:12:47 +0000 (23:12 +0000)]
kill warning
Dave Jones [Fri, 7 Jan 2005 05:58:05 +0000 (05:58 +0000)]
auto-import hardlink-1.0-1.1 on branch devel from hardlink-1.0-1.1.src.rpm
Karel Zak [Mon, 11 Jun 2018 14:28:59 +0000 (16:28 +0200)]
docs: update TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 11 Jun 2018 14:27:51 +0000 (16:27 +0200)]
mount: add -N to man page helpers section
Signed-off-by: Karel Zak <kzak@redhat.com>
Vaclav Dolezal [Tue, 24 Apr 2018 16:05:04 +0000 (18:05 +0200)]
umount: fix behaviour of -A and -R with --namespace
Load /proc/self/mountinfo from correct namespace.
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Vaclav Dolezal [Fri, 20 Apr 2018 15:57:39 +0000 (17:57 +0200)]
umount: allow PID as --namespace argument
[kzak@redhat.com: - update code]
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Vaclav Dolezal [Fri, 20 Apr 2018 15:57:39 +0000 (17:57 +0200)]
mount: allow PID as --namespace argument
[[kzak@redhat.com: - update code]
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Vaclav Dolezal [Tue, 17 Apr 2018 13:52:54 +0000 (15:52 +0200)]
mount: document --namespace in man/help
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Vaclav Dolezal [Wed, 11 Apr 2018 13:52:52 +0000 (15:52 +0200)]
libmount: switch namespace when appropriate
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Vaclav Dolezal [Tue, 6 Mar 2018 11:30:27 +0000 (12:30 +0100)]
libmount: support for namespaces for helpers
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Karel Zak [Mon, 11 Jun 2018 14:06:17 +0000 (16:06 +0200)]
libmount: make errno usable after mnt_context_set_target_ns()
Signed-off-by: Karel Zak <kzak@redhat.com>
Vaclav Dolezal [Thu, 15 Mar 2018 13:06:48 +0000 (14:06 +0100)]
umount: add support for namespaces
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Vaclav Dolezal [Mon, 19 Feb 2018 17:58:23 +0000 (18:58 +0100)]
mount: add support for namespaces
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>