]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Karel Zak [Fri, 21 Oct 2016 11:34:28 +0000 (13:34 +0200)]
Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux
* 'test-fixes' of https://github.com/rudimeier/util-linux:
build-sys: fix missing ncursesw message
tests: avoid &>> for bash compatibility
Karel Zak [Fri, 21 Oct 2016 11:33:32 +0000 (13:33 +0200)]
build-sys: fix drone.io builds
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Thu, 20 Oct 2016 08:50:04 +0000 (10:50 +0200)]
build-sys: fix missing ncursesw message
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Wed, 19 Oct 2016 18:45:19 +0000 (20:45 +0200)]
tests: avoid &>> for bash compatibility
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Thu, 20 Oct 2016 16:24:24 +0000 (18:24 +0200)]
tests: call umount --fake for tmpfs tests
On old systems (e.g. RHEL6) with /sbin/mount.tmpfs the mtab file is
modified although our in-tree mount does not support mtab file. We
need to call umount --fake to be sure that we remove unwanted lines
from the test.
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 20 Oct 2016 15:30:30 +0000 (17:30 +0200)]
build-sys: fix typo on ncurses-config command line
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 20 Oct 2016 14:52:31 +0000 (16:52 +0200)]
build-sys: use ncurses-config rather than pkg-config
It's painful, but ncurses upstream does not distribute .pc files by
default and it seems that ncurses{6,5}-config is the preferred solution.
For better compatibility lets use ncurses-config.
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Oct 2016 12:33:55 +0000 (14:33 +0200)]
build-sys: release++ (v2.29-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Oct 2016 12:32:33 +0000 (14:32 +0200)]
docs: update v2.29-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Oct 2016 12:30:19 +0000 (14:30 +0200)]
docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Oct 2016 12:27:56 +0000 (14:27 +0200)]
po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Oct 2016 12:21:15 +0000 (14:21 +0200)]
tests: update build-sys expected output
The su(1) change based on libseccomp has been reverted.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Oct 2016 11:33:15 +0000 (13:33 +0200)]
cramfs: revert crc32 changes
We cannot use our crc32 without changes in the code, because our
ul_crc32() assumes that post-conditioning (xor) is done by
application. The zlib implementation does everything.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Oct 2016 10:17:19 +0000 (12:17 +0200)]
cramfs: add missing includes
Signed-off-by: Karel Zak <kzak@redhat.com>
Gustavo Zacarias [Mon, 10 Oct 2016 20:54:24 +0000 (17:54 -0300)]
lib/crc32: prefix public functions
Make the publicly-visible crc32 library functions prefixed by ul_, such
as crc32() -> ul_crc32().
This is because it clashes with the crc32() function from zlib.
For newer versions of glib (2.50+) zlib and libblkid are required
dependencies and otherwise results in build failure when building
statically.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Karel Zak [Tue, 18 Oct 2016 10:08:50 +0000 (12:08 +0200)]
fstrim: add -v to the systemd service
It seems to be good idea to have more verbose output in the log files
for weekly fstrim execution. The verbose adds details (one line) for
each filesystem.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=
1337304
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 Oct 2016 14:10:28 +0000 (16:10 +0200)]
cal: support abbreviated month names
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 Oct 2016 14:02:36 +0000 (16:02 +0200)]
cal: support alone month name parameter
For example 'cal August' to print August for the current year.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 Oct 2016 13:44:18 +0000 (15:44 +0200)]
cal: cleanup man page
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 Oct 2016 13:24:32 +0000 (15:24 +0200)]
cal: remove err message from monthname_to_number()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 7 Oct 2016 08:57:37 +0000 (10:57 +0200)]
docs: update AUTHORS file
Addresses: https://github.com/karelzak/util-linux/commit/
b86db3c7cff489b8ce4cf9fc58176a78a1797bdc #commitcomment-
19326504
Signed-off-by: Karel Zak <kzak@redhat.com>
Stanislav Brabec [Wed, 5 Oct 2016 18:55:42 +0000 (20:55 +0200)]
losetup --nooverlap: fix typo
Option is documented and used as --nooverlap, bud coded as --nooverlaps.
--nooverlap is considered as shortened option, making the typo
invisible.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Tobias Stoeckmann [Mon, 3 Oct 2016 20:06:23 +0000 (22:06 +0200)]
rev: Avoid out of boundary read
Check if the length of the parsed string is at least 1,
otherwise an out of boundary read would occur.
Tobias Stoeckmann [Mon, 3 Oct 2016 20:05:46 +0000 (22:05 +0200)]
rev: Avoid calling free in a signal handler
free() is not a safe function for a signal handler. The next
line calls _exit() anyway, so there is no need for resource
management.
Tobias Stoeckmann [Mon, 3 Oct 2016 20:05:03 +0000 (22:05 +0200)]
libblkid: Avoid strlen if only first char is checked
A strlen() call can lead to out of boundary read access if the
superblock in question has no nul-bytes after the string. This
could be avoided by using strnlen() but the calls in question
merely existed to check if the string length is not 0.
By changing the calls as proposed with this diff, these files are
in sync with other superblock files, which do exactly the same.
Karel Zak [Thu, 6 Oct 2016 08:28:33 +0000 (10:28 +0200)]
docs: update infor about TIOCSTI
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 5 Oct 2016 10:11:44 +0000 (12:11 +0200)]
Merge branch 'master' of https://github.com/Zeuh/util-linux
Karel Zak [Wed, 5 Oct 2016 09:25:04 +0000 (11:25 +0200)]
wdct: mark usage() as noreturn [coverity scan]
Karel Zak [Wed, 5 Oct 2016 09:20:26 +0000 (11:20 +0200)]
swapoff: fix mem leak [coverity scan]
Karel Zak [Wed, 5 Oct 2016 09:12:45 +0000 (11:12 +0200)]
setarch: let's keep analyzer happy [coverity scan]
Karel Zak [Wed, 5 Oct 2016 09:11:45 +0000 (11:11 +0200)]
rtcwake: make sure buffer is zero terminated [coverity scan]
Karel Zak [Wed, 5 Oct 2016 08:53:02 +0000 (10:53 +0200)]
lsns: fix mem leak [coverity scan]
Karel Zak [Wed, 5 Oct 2016 08:38:28 +0000 (10:38 +0200)]
findmnt: (verify) fix mem leak [coverity scan]
Karel Zak [Tue, 4 Oct 2016 18:15:09 +0000 (20:15 +0200)]
isosize: fix read() result check
Karel Zak [Tue, 4 Oct 2016 14:33:09 +0000 (16:33 +0200)]
libmount: fix null-checking [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 14:23:52 +0000 (16:23 +0200)]
libblkid: check blkid_parse_tag_string() return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 14:18:16 +0000 (16:18 +0200)]
lib/randutils: remove unnecessary function
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 14:14:48 +0000 (16:14 +0200)]
lib/mbsalign: free buffer after error [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 14:08:55 +0000 (16:08 +0200)]
sfdisk: cleanup before going out of scope [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 14:03:11 +0000 (16:03 +0200)]
sfdisk: free before going out of scope [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 13:56:59 +0000 (15:56 +0200)]
isosize: don't ignore read() result [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 13:53:55 +0000 (15:53 +0200)]
fsck.cramfs: don't ignore read() result [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 13:53:19 +0000 (15:53 +0200)]
tests: (cramfs) check for test_sysinfo
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 4 Oct 2016 13:02:00 +0000 (15:02 +0200)]
cfdisk: fix mountpoint detection
Signed-off-by: Karel Zak <kzak@redhat.com>
Richard Yann [Tue, 4 Oct 2016 12:48:06 +0000 (14:48 +0200)]
Fix: list all block device from /dev and all symbolic links to block devices
Before fix "fsck -y /d<tab>" will never show LVM VG from multipath or mapped devices
Karel Zak [Mon, 3 Oct 2016 14:56:56 +0000 (16:56 +0200)]
Revert "su,runuser: add libseccomp based workaround for TIOCSTI ioctl"
This reverts commit
8e4925016875c6a4f2ab4f833ba66f0fc57396a2 .
Stupid hack...
Karel Zak [Mon, 3 Oct 2016 09:59:25 +0000 (11:59 +0200)]
tests: add chrt vs. nice test
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 3 Oct 2016 09:02:35 +0000 (11:02 +0200)]
chrt: follow nice setting, prefer sched_setscheduler()
* do not reset 'nice' setting by sched_setattr(), if 'nice' setting
is not zero then chrt ends with EPERM for non-root users:
$ renice -n 5 -p $$; chrt -v -b 0 date
12475 (process ID) old priority 0, new priority 5
chrt: failed to set pid 0's policy: Operation not permitted
* it seems more elegant to always use old sched_setscheduler() API for
non-deadline policies; in this case we do not need getpriority()
to keep 'nice' unchanged.
Addresses: https://github.com/karelzak/util-linux/issues/359
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Sep 2016 23:20:06 +0000 (01:20 +0200)]
tools: make ko-release-gen usable with gpg2
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Sep 2016 09:24:42 +0000 (11:24 +0200)]
build-sys: release++ (v2.29-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Sep 2016 09:22:39 +0000 (11:22 +0200)]
docs: update v2.29-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Sep 2016 09:13:00 +0000 (11:13 +0200)]
docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Sep 2016 09:05:42 +0000 (11:05 +0200)]
po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Sep 2016 09:01:41 +0000 (11:01 +0200)]
libsmartcols: add scols_column_add_width()
Signed-off-by: Karel Zak <kzak@redhat.com>
Sebastian Rasmussen [Fri, 30 Sep 2016 08:34:15 +0000 (10:34 +0200)]
po: update sv.po (from translationproject.org)
Jakub Bogusz [Fri, 30 Sep 2016 08:34:15 +0000 (10:34 +0200)]
po: update pl.po (from translationproject.org)
Benno Schulenberg [Fri, 30 Sep 2016 08:34:15 +0000 (10:34 +0200)]
po: update nl.po (from translationproject.org)
Takeshi Hamasaki [Fri, 30 Sep 2016 08:34:15 +0000 (10:34 +0200)]
po: update ja.po (from translationproject.org)
Antonio Ceballos Roa [Fri, 30 Sep 2016 08:34:15 +0000 (10:34 +0200)]
po: update es.po (from translationproject.org)
Philipp Thomas [Fri, 30 Sep 2016 08:34:15 +0000 (10:34 +0200)]
po: update de.po (from translationproject.org)
Petr Písař [Fri, 30 Sep 2016 08:34:15 +0000 (10:34 +0200)]
po: update cs.po (from translationproject.org)
Karel Zak [Fri, 30 Sep 2016 08:30:07 +0000 (10:30 +0200)]
findmnt: remove duplicate include
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 30 Sep 2016 08:29:00 +0000 (10:29 +0200)]
tests: update build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 29 Sep 2016 14:32:33 +0000 (16:32 +0200)]
su,runuser: add libseccomp based workaround for TIOCSTI ioctl
This patch add libseccomp based syscalls filter to disable TIOCSTI
ioctl in su/runuser children.
IMHO it is not elegant solution due to dependence on libseccomp
(--without-seccomp if hate it)... but there is nothing better for now.
Addresses: CVE-2016-2779
Signed-off-by: Karel Zak <kzak@redhat.com>
Stanislav Brabec [Wed, 2 Mar 2016 19:35:54 +0000 (20:35 +0100)]
tests: Add helper for TIOCSTI exploit
This helper/exploit injects "id -u -n\n" to the vulnerable calling terminal.
Use id -u -n to get a reproducible output of test cases based on it.
What can happen:
Nothing, no exploit: pty is not accessible, sedsid() disconnected the task from
pty, TIOCSTI failed.
The command is injected to the unprivileged environment pty, and you see e. g.
"nobody": This is acceptable.
The command is injected to the caller (privileged) pty, and you see "root" (or
caller uid name): This is not acceptable and has security implications.
References:
CVE-2016-2779
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2779
http://seclists.org/oss-sec/2016/q1/448
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815922
https://bugzilla.redhat.com/show_bug.cgi?id=173008
https://bugzilla.suse.com/show_bug.cgi?id=968674
https://bugzilla.suse.com/show_bug.cgi?id=968675
CVE-2016-2781
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2781
http://seclists.org/oss-sec/2016/q1/452
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Federico Bento <up201407890@alunos.dcc.fc.up.pt>
Karel Zak [Thu, 29 Sep 2016 09:55:07 +0000 (11:55 +0200)]
libmount: paranoid change in mnt_table_is_fs_mounted()
Signed-off-by: Karel Zak <kzak@redhat.com>
Aurelien Aptel [Thu, 1 Sep 2016 11:57:42 +0000 (13:57 +0200)]
libmount: fix mount -a for cifs
when mounting a cifs share, the src is actually an UNC path which can in
in several forms:
simple: //host/share, //host/share/
including subpath: //host/share/sub/path
to check if the cifs fs is mounted we have to extract the subpath and
compare *that* to the root.
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Tobias Stoeckmann [Thu, 8 Sep 2016 19:19:22 +0000 (21:19 +0200)]
ul: Fix buffer overflow
The text-utility ul can run into a buffer overflow on very long lines.
See this proof of concept how to reproduce the issue:
$ dd if=/dev/zero bs=1M count=10 | tr '\000' '\041' > poc.txt
$ echo -ne '\xe\x5f\x8\x5f\x61\x2\xf\x5f\x8\x5f' | dd of=poc.txt conv=notrunc
$ ul -i poc.txt > /dev/null # output would take ages
Segmentation fault
$ _
The problem manifests by using alloca with "maxcol", which can be as
large as INT_MAX, based on the input line.
A very long line (> 8 MB) with modes must be supplied to ul, as seen in
my proof of concept byte sequence above.
It is rather easy to fix this issue: allocate space on the heap instead.
maxcol could overflow here, but in that case no system will have enough
space to handle the request, properly ending ul through an err() call.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Sami Kerola [Sun, 4 Sep 2016 10:15:34 +0000 (11:15 +0100)]
lib/strutils: make left and right trims more robust
Do not follow null pointer, and stop going any further when
ltrim_whitespace() is at the end of a string.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Karel Zak [Tue, 27 Sep 2016 12:16:18 +0000 (14:16 +0200)]
libsmartcols: custom wrap fixes
Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 27 Sep 2016 10:52:47 +0000 (12:52 +0200)]
docs: some random fixes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 27 Sep 2016 09:58:32 +0000 (11:58 +0200)]
libfdisk: (docs) add missing version notes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 27 Sep 2016 09:35:43 +0000 (11:35 +0200)]
libsmartcols: (docs) add missing version notes
Signed-off-by: Karel Zak <kzak@redhat.com>
Igor Gnatenko [Fri, 23 Sep 2016 14:05:02 +0000 (16:05 +0200)]
libsmartcols: fixes in doc generation
* Add 2.29 symbols index
* Sync argument names between header and implementation
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Karel Zak [Mon, 26 Sep 2016 09:20:07 +0000 (11:20 +0200)]
libsmartcols: support custom wrap and remove SCOLS_FL_WRAPNL
This new API provides full control on multi-line cells, you can wrap
text by new lines (build-in support) or by another way (after words,
commas, etc.) Changes:
* new scols_column_set_wrapfunc() sets pointers to two callback functions
1/ chunksize() - returns largest data chunk size; used when we
calculate columns width
2/ nextchunk() - terminate the current chunk and returns pointer to
the next; used when we print data
* remove SCOLS_FL_WRAPNL and add new functions scols_wrapnl_chunksize()
and scols_wrapnl_nextchunk() to provide build-in functionality to
wrap cells on \n
* remove scols_column_is_wrapnl() add scols_column_is_customwrap()
(returns true if custom wrap functions are defined)
* add scols_column_set_safechars() and scols_column_get_safechars() to
allow to control output encoding, safe chars are not encoded by \xFOO
* modify "fromfile" test code to use build-in scols_wrapnl_* callbacks
for "wrapnl" tests
* add new function scols_column_get_table()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 23 Sep 2016 12:31:06 +0000 (14:31 +0200)]
libsmartcols: (docs) add missing functions
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 23 Sep 2016 12:25:37 +0000 (14:25 +0200)]
Merge branch 'getters' of https://github.com/ignatenkobrain/util-linux
* 'getters' of https://github.com/ignatenkobrain/util-linux:
libsmartcols: add scols_table_is_nolinesep()
libsmartcols: add scols_table_is_nowrap()
libsmartcols: add scols_table_get_name()
Igor Gnatenko [Fri, 23 Sep 2016 12:21:15 +0000 (14:21 +0200)]
libsmartcols: add scols_table_is_nolinesep()
And save 1 or 0 into tb->no_linesep instead of any value.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Igor Gnatenko [Fri, 23 Sep 2016 12:20:41 +0000 (14:20 +0200)]
libsmartcols: add scols_table_is_nowrap()
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Karel Zak [Fri, 23 Sep 2016 12:20:24 +0000 (14:20 +0200)]
libsmartcols: cleanup scols_table_set_symbols() API
Change behavior:
* scols_table_set_symbols(tb, NULL) remove reference to the current symbols setting
and does not set default symbols at all
Add new functions:
* scols_table_get_symbols()
* scols_table_set_default_symbols()
Signed-off-by: Karel Zak <kzak@redhat.com>
Igor Gnatenko [Fri, 23 Sep 2016 12:09:43 +0000 (14:09 +0200)]
libsmartcols: add scols_table_get_name()
Currently we have scols_table_set_name() but don't have getter for it.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Karel Zak [Fri, 23 Sep 2016 11:20:49 +0000 (13:20 +0200)]
findmnt: (verify) add docs
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 22 Sep 2016 11:46:05 +0000 (13:46 +0200)]
findmnt: (verify) minor changes in strings
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 22 Sep 2016 11:40:24 +0000 (13:40 +0200)]
findmnt: (verify) check filesystem type
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 21 Sep 2016 13:08:24 +0000 (15:08 +0200)]
findmnt: (verify) add swaparea verification
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 21 Sep 2016 12:32:47 +0000 (14:32 +0200)]
findmnt: (verify) add options verification
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 21 Sep 2016 12:15:49 +0000 (14:15 +0200)]
findmnt: (verify) add source verification
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 20 Sep 2016 13:45:15 +0000 (15:45 +0200)]
findmnt: add --verify and --verbose
Signed-off-by: Karel Zak <kzak@redhat.com>
Igor Gnatenko [Fri, 23 Sep 2016 09:24:28 +0000 (11:24 +0200)]
libsmartcols: use const qualifier for scols_table_get_termwidth
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Karel Zak [Fri, 23 Sep 2016 09:14:15 +0000 (11:14 +0200)]
Merge branch 'api_const' of https://github.com/ignatenkobrain/util-linux
* 'api_const' of https://github.com/ignatenkobrain/util-linux:
libsmartcols: use const qualifier where it's possible
debug: use const void * for ul_debugobj()
libsmartcols: make get_line/column_separator() return const
Karel Zak [Fri, 23 Sep 2016 09:07:15 +0000 (11:07 +0200)]
Merge branch 'master' of https://github.com/ignatenkobrain/util-linux
Karel Zak [Thu, 22 Sep 2016 11:47:23 +0000 (13:47 +0200)]
libsmartcols: keep scols_table_get_termwidth() read-only
Addresses: https://github.com/karelzak/util-linux/issues/356
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 21 Sep 2016 12:47:32 +0000 (14:47 +0200)]
swapon: fix discard option parsing
The current code does not work as expected if there is an option
behind the discard=<arg>, for example:
swapon /dev/sdc -o discard=once,pri=10
ignores "once" the result is SWAP_FLAG_DISCARD; strace:
Old version:
swapon("/dev/sdc", SWAP_FLAG_PREFER|SWAP_FLAG_DISCARD|10) = 0
Fixed version:
swapon("/dev/sdc", SWAP_FLAG_PREFER|SWAP_FLAG_DISCARD|SWAP_FLAG_DISCARD_ONCE|10) = 0
Signed-off-by: Karel Zak <kzak@redhat.com>
Igor Gnatenko [Wed, 21 Sep 2016 06:30:48 +0000 (08:30 +0200)]
libsmartcols: use const qualifier where it's possible
Closes: https://github.com/karelzak/util-linux/issues/355
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Igor Gnatenko [Wed, 21 Sep 2016 06:22:35 +0000 (08:22 +0200)]
debug: use const void * for ul_debugobj()
We don't modify data it's pointing out and we should not modify it.
Also remove casting to void * as gcc will do it automatically (before
we had to cast it explicitly to avoid warning on discarding 'const'
qualifier).
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Igor Gnatenko [Wed, 21 Sep 2016 05:25:23 +0000 (07:25 +0200)]
libsmartcols: make get_line/column_separator() return const
The patch introduces tiny API changes (char * -> const char *) for
scols_table_get_line_separator
scols_table_get_column_separator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Igor Gnatenko [Tue, 20 Sep 2016 13:36:55 +0000 (15:36 +0200)]
trivial: use tabs consistently
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Karel Zak [Mon, 19 Sep 2016 12:21:18 +0000 (14:21 +0200)]
Merge branch 'hotfix' of https://github.com/ignatenkobrain/util-linux
Karel Zak [Mon, 19 Sep 2016 12:20:37 +0000 (14:20 +0200)]
Merge branch 'typos' of https://github.com/ignatenkobrain/util-linux
* 'typos' of https://github.com/ignatenkobrain/util-linux:
libsmartcols: fix typos in docs
Igor Gnatenko [Sat, 17 Sep 2016 16:55:52 +0000 (18:55 +0200)]
libsmartcols: be consistent, use 'sy' for symbols
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>