| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
* '170622' of github.com:jwpi/util-linux:
Docs: move option naming to howto-contribute.txt
Docs: update howto-usage-function.txt
Docs: add a comment for constants to boilerplate.c
include/c.h: add USAGE_COMMANDS and USAGE_COLUMNS
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* login-utils/lslogins.c: all uses changed
* misc-utils/findmnt.c: likewise
* sys-utils/blkzone.c: likewise
* disk-utils/sfdisk.c: likewise
* sys-utils/lscpu.c: likewise
* sys-utils/lsmem.c: likewise
* sys-utils/wdctl.c: likewise
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 'fix-exit-codes' of https://github.com/rudimeier/util-linux:
misc: fix optutils.h related exit codes
misc: fix xalloc.h related exit codes
misc: fix more strutils related exit codes
lib: fix strutils.h, remove STRTOXX_EXIT_CODE
misc: fix some broken exit codes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Found by:
grep -L "XALLOC_EXIT_CODE" $(grep -l "xalloc\.h" \
$(git grep -l "_EX_\|FINDFS_\|BLKID_EXIT\|EX_USAGE" -- "*.c"))
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As discussed on the mailing list. We fix all places
where the non-working define STRTOXX_EXIT_CODE was used.
Regarding tunelp, also see 7e3c80a7.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These tools have special exit codes. They got changed mistakenly.
See:
findfs 0e1fa6b6
fsck 658c0891
fsck.cramfs 922ec175
mkfs.cramfs 16154b1f
tunelp 2ab428f6
FIXME: STRTOXX_EXIT_CODE doesn't work as it should.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| | |
Nowadays all our regular commands have --help options.
test_uuidd does not use translations anyways.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| | |
We can use errtryhelp() now and never print usage to stderr.
One may improve all these "bad usage" messages.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| | |
We have a --help option and this is preferred.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|/
|
|
| |
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
The rename(1) can exit early when replace expression and replacement are
identical string. It is also appropriate to change return value in this
case to 'nothing was renamed'.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Original patch and commit message edited by Rudi.)
gcc-7 adds -Wimplicit-fallthrough=3 to our default flag -Wextra.
This warning can be silenced by using comment /* fallthrough */
which is also recognized by other tools like coverity. There are
also other valid comments (see man gcc-7) but we consolidate this
style now.
We could have also used __attribute__((fallthrough)) but the comment
looks nice and does not need to be ifdef'ed for compatibility.
Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652
Reference: https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
Reviewed-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Suggested-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now lsblk uses --list when --sort <column> is specified. This patch
allows to specify --tree to overwrite this default behavior add to
force tree-like output. In this case tree branches are sorted by the
<column>.
$ lsblk --sort SIZE
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda2 8:2 0 200M 0 part /boot
sda1 8:1 0 200M 0 part /boot/efi
sda6 8:6 0 7.8G 0 part [SWAP]
sda5 8:5 0 35.1G 0 part /home/misc
sda4 8:4 0 50G 0 part /
sdb1 8:17 0 74.5G 0 part /home/archive
sdb 8:16 0 74.5G 0 disk
sda3 8:3 0 130.3G 0 part /home
sda 8:0 0 223.6G 0 disk
$ lsblk --sort SIZE --tree
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 74.5G 0 disk
└─sdb1 8:17 0 74.5G 0 part /home/archive
sda 8:0 0 223.6G 0 disk
├─sda2 8:2 0 200M 0 part /boot
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda6 8:6 0 7.8G 0 part [SWAP]
├─sda5 8:5 0 35.1G 0 part /home/misc
├─sda4 8:4 0 50G 0 part /
└─sda3 8:3 0 130.3G 0 part /home
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| | |
* 'rename-nooverride' of https://github.com/dov/util-linux:
Changed "override" to "overwrite" rename option.
Added --no-override option to rename.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
* 'master' of https://github.com/yurchor/util-linux:
Fix minor typos
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sys-utils/prlimit.c: In function 'do_prlimit':
sys-utils/prlimit.c:367:16: warning: format '%ju' expects argument of type 'uintmax_t', but argument 2 has type 'rlim_t {aka long long unsigned int}' [-Wformat=]
printf("<%ju", new->rlim_cur);
lib/plymouth-ctrl.c: In function 'open_un_socket_and_connect':
lib/plymouth-ctrl.c:88:20: warning: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types]
ret = connect(fd, &su, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(su.sun_path+1));
^
In file included from lib/plymouth-ctrl.c:35:0:
/usr/include/sys/socket.h:314:5: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *'
int connect (int, const struct sockaddr *, socklen_t);
login-utils/last.c: In function 'list':
login-utils/last.c:506:54: warning: pointer targets in passing argument 4 of 'dns_lookup' differ in signedness [-Wpointer-sign]
r = dns_lookup(domain, sizeof(domain), ctl->useip, p->ut_addr_v6);
^
login-utils/last.c:291:12: note: expected 'int32_t * {aka int *}' but argument is of type 'unsigned int *'
static int dns_lookup(char *result, int size, int useip, int32_t *a)
^~~~~~~~~~
In file included from sys-utils/hwclock-cmos.c:92:0:
sys-utils/hwclock.h:67:32: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
extern double time_diff(struct timeval subtrahend, struct timeval subtractor);
misc-utils/test_uuidd.c: In function 'create_nthreads':
misc-utils/test_uuidd.c:187:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
proc->pid, (int) th->tid, th->index));
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* assume ncursesw headers in ncursesw/ directory only
* prefer long paths, <term.h> and <ncurses.h> should be last
possibility
* fix typos
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* use proper paths to term.h
* keep ncurses support optional
* link with TINFO_LIBS (-ltinfo), or fallback to NCURSES_LIBS (-ltinfo -lncurses)
* don't include unnecessary ncurses.h (term.h is enough)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|/
|
|
|
|
|
| |
The header file is not provided by musl-libc.
Reported-by: Assaf Gordon <assafgordon@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
It is reasonable to assume use of --no-act means one wants to always see
what would have happen if rename is done. To say same slightly differently,
if there is sn use case for silent rename --no-act run I cannot think one.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
... just to keep translators happy
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
Add back a character lost in earlier change.
Regression-from: d27f5fe770025e456fbd33b87a96968f34c455ed
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* '2017wk16' of git://github.com/kerolasa/lelux-utiliteetit:
chfn, chsh: use readline(3) to receive user input
findfs: use getopt_long() to parse options
logger: make month names, login name, and tag read-only objects
sulogin: reduce vulnerability surface
partx: add --list-types option
libblkid: add blkid_partitions_get_name()
docs: try to convince open(2) O_DIRECT rather than using raw device
blkid: add long options
lsipc: fix options parsing and sync with man page
|
| |
| |
| |
| |
| |
| |
| | |
This change makes the findfs(8) more coherent with other commands in the
project source tree.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change attempts to make tab completion more reasonable by alloging
memorizable option names. That also has positive impact to manual page, in
which referrals to other options are now easier to understand.
All short options are kept exactly as they were to avoid ABI breakage. The
only exception is -f option that getopt(3) recognized, but was not found
from anywhere else. The -f has been part of blkid since the initial commit.
Commit: 51410fc6deb29cae54a2669aafabae6c49f964fc
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|/
|
|
| |
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ lsblk --discard --perms
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO NAME SIZE OWNER GROUP MODE
sdb 0 0B 0B 0 sdb 74.5G root disk brw-rw----
└─sdb1 0 0B 0B 0 └─sdb1 74.5G root disk brw-rw----
sda 0 512B 2G 0 sda 223.6G root disk brw-rw----
├─sda4 0 512B 2G 0 ├─sda4 50G root disk brw-rw----
├─sda2 0 512B 2G 0 ├─sda2 200M root disk brw-rw----
├─sda5 0 512B 2G 0 ├─sda5 35.1G root disk brw-rw----
├─sda3 0 512B 2G 0 ├─sda3 130.3G root disk brw-rw----
├─sda1 0 512B 2G 0 ├─sda1 200M root disk brw-rw----
└─sda6 0 512B 2G 0 └─sda6 7.8G root disk brw-rw----
... see NAME column.
It's fine to support duplicated columns when requested by user (e.g.
-o NAME,NAME,SIZE), but it does not make sense for the default output
when multiple command options specified.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the column "ZONED" to the output to display block devices zone
model information.
Example output:
> lsblk -o+ZONED
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT ZONED
sda 8:0 0 111.8G 0 disk none
├─sda1 8:1 0 500M 0 part /boot none
├─sda2 8:2 0 87.3G 0 part / none
└─sda3 8:3 0 24G 0 part [SWAP] none
sdb 8:16 0 12.8T 0 disk host-managed
sdc 8:32 0 5.5T 0 disk host-managed
or:
> lsblk --zoned
NAME ZONED
sda none
├─sda1 none
├─sda2 none
└─sda3 none
sdb host-managed
sdc host-managed
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
|
|
|
|
|
|
|
| |
Let's follow --inverse dependencies although --list output requested.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1441175
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
It seems better to avoid "int" at all from sizes calculations to make
the code more robust for future changes.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
This failed on ppc64 with page size 64k.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Let's also hide the show[] array in has_item().
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
* '2017wk11' of git://github.com/kerolasa/lelux-utiliteetit:
blkid: add control struct
blkid: simplify version option handling
tests: add static keyword where needed [smatch scan]
tests: do not use plain 0 as NULL [smatch scan]
libsmartcols: fix test variable shadowing
|
| |
| |
| |
| | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|