Commit Graph

10039 Commits

Author SHA1 Message Date
Igor Gnatenko 2bdbc8e834 add util-linux.doap
This is also well-known RDF Schema supported by some editors.

Reference: https://github.com/edumbill/doap/wiki
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-25 00:58:46 +01:00
Igor Gnatenko f9f6b563aa add .editorconfig
EditorConfig is very well known config file for text editors/IDE's
with settings for project. This format supported by Vim, GNOME Builder,
Atom, Sublime and many others.

We will provide this configuration to be more friendly for newcomers.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-25 00:12:14 +01:00
Igor Gnatenko db307d8e96 libsmartcols: add 'Since' tag for gtkdoc for some functions
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-25 00:12:14 +01:00
Igor Gnatenko 703d0196ee libsmartcols: add few methods to get information about title
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-25 00:12:14 +01:00
Igor Gnatenko bfc3d8b48e libsmartcols: position of title in fact unsigned
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-25 00:12:14 +01:00
Karel Zak 63107d1bbc lsblk: remove useless warnings
It's seems better to keep the warnings only in the debug output.

Reported-by:  Kay Sievers <kay@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-22 19:38:18 +01:00
Karel Zak 57867795aa libsmartcols: support multibyte titles, rename wrap to padding
- let's support multibyte table titles
- use lib/mbalign.c to align the title
- rename title_wrap to title_padding (we already use "wrap" on another
  places for another things)

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-22 16:51:59 +01:00
Karel Zak fd5cbf57e0 libsmartcols: add title to the test application
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-22 13:50:02 +01:00
Karel Zak 6f2737964d libsmartcols: add JSON to the test application
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-22 13:46:29 +01:00
Karel Zak 500a229f51 libsmartcols: add new functions to docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-22 13:40:19 +01:00
Karel Zak 788da91b11 Merge branch 'table_title' of https://github.com/ignatenkobrain/util-linux
* 'table_title' of https://github.com/ignatenkobrain/util-linux:
  libsmartcols: set everything once in scols_table_set_title()
  libsmartcols: put new line after title
  libsmartcols: fix title aligning to center
  libsmartcols: don't try to align title if it's more that term
  libsmartcols: use symbols for title wrap
  libsmartcols: implement title of table
2016-01-22 13:34:05 +01:00
Igor Gnatenko 0a69e647fc libsmartcols: set everything once in scols_table_set_title()
Reported-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-22 12:54:02 +01:00
Igor Gnatenko 2f62d9fe3e libsmartcols: put new line after title
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-21 17:37:21 +01:00
Igor Gnatenko 7bc451694f libsmartcols: fix title aligning to center
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-21 17:36:53 +01:00
Igor Gnatenko 284ee2a9a4 libsmartcols: don't try to align title if it's more that term
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-21 17:25:15 +01:00
Igor Gnatenko cd32dc248c libsmartcols: use symbols for title wrap
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-21 17:09:16 +01:00
Igor Gnatenko b3256efff2 libsmartcols: implement title of table
Reference: https://github.com/karelzak/util-linux/issues/258
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-21 16:41:12 +01:00
Karel Zak 1ab7abacce zramctl: fix typo
Reported-by: Rafael Fontenelle <rffontenelle@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-21 11:21:27 +01:00
Mike Frysinger e4520bf20f mount: allow nofail to silence ENOMEDIUM cases
Allow people to use nofail to ignore empty cd/dvd drive errors.

URL: https://bugs.gentoo.org/559356
Reported-by: William Hubbs <williamh@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-01-21 10:50:20 +01:00
Karel Zak acde3a05a9 chrt: use sched_getattr() 2016-01-20 15:32:30 +01:00
Karel Zak 5b033bfd85 chrt: make man page more structured
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 14:30:52 +01:00
Karel Zak 1a7e63950b chrt: add support for SCHED_DEADLINE
This patch introduces

	-d, --deadline
	-T, --sched-runtime
	-D, --sched-deadline
	-P, --sched-period

command line options. The functionality is available only for Linux with
sched_setattr() [kernel >=3.14]

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 14:04:32 +01:00
Karel Zak 15167589fb chrt: use sched_setattr() if available
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 12:44:27 +01:00
Karel Zak a6fec53788 chrt: make usage more readable
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-19 14:52:51 +01:00
Karel Zak 4820a7373a chrt: set function refactoring
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-19 14:46:30 +01:00
Karel Zak a30cf65076 chrt: output function refactoring
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-19 14:38:18 +01:00
Karel Zak 7a4ea5664e chrt: add control struct
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-19 14:24:53 +01:00
Boris Egorov 4ec6062678 tests: remove redundant check for NULL [cppcheck]
We set SA_SIGINFO flag, so we should not get NULL.

[tests/helpers/test_sigreceive.c:45] -> [tests/helpers/test_sigreceive.c:47]: (warning) Either the condition 'if(info)' is redundant or there is possible null pointer dereference: info.
2016-01-19 12:59:12 +06:00
Boris Egorov faebeb86e5 hwclock: fix format specifier [cppcheck]
[sys-utils/hwclock-rtc.c:435]: (warning) %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'.
2016-01-19 12:59:12 +06:00
Boris Egorov 0cd7ecefc5 libblkid: check limits before indexing array [cppcheck]
[libblkid/src/encode.c:165]: (style) Array index 'i' is used before limits check.
2016-01-19 12:59:12 +06:00
Boris Egorov 01b63fcca2 readprofile: add scanf field width limits [cppcheck]
[sys-utils/readprofile.c:301]: (warning) scanf without field width limits can crash with huge input data.
[sys-utils/readprofile.c:322]: (warning) scanf without field width limits can crash with huge input data.
2016-01-19 12:59:12 +06:00
Boris Egorov fef0063119 libblkid,libmount: Do not use void* in calculations [cppcheck]
[libblkid/src/superblocks/zfs.c:179]: (portability) 'label' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined.
[libblkid/src/superblocks/zfs.c:237]: (portability) 'label' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libblkid/src/topology/topology.c:221]: (portability) 'chn.data' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmount/src/fs.c:153]: (portability) 'old' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined.
[libmount/src/fs.c:154]: (portability) 'new' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
2016-01-19 12:59:12 +06:00
Boris Egorov 18b76be61c libblkid: (zfs) add cast to fix UB [cppcheck]
[libblkid/src/superblocks/zfs.c:173]: (error) Shifting 32-bit value by 56 bits is undefined behaviour
[libblkid/src/superblocks/zfs.c:173]: (error) Shifting 32-bit value by 40 bits is undefined behaviour
2016-01-19 11:41:37 +06:00
Karel Zak 7675d69d01 libblkid: make minix prober more robust
It seems that the current minix probing code is not robust enough and
it returns false positive for Fedora f24 install images. The crazy thing
is that the image pass also all Linux kernel minix_fill_super() checks
and mount(2) fails later when it tries to read filesystem root
directory.

The fsck.minix requires sb->s_log_zone_size to be zero (Linux kernel
does not care about it), let's use the same requirement for libblkid.

Note, it would be possible to check minix root directory inode in
libblkid, but this solution requires minix prober specific seek &
read. We want to avoid extra read operations...

References: https://bugzilla.redhat.com/show_bug.cgi?id=1299255
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-18 14:47:40 +01:00
Karel Zak 8afabdb1fa libsmartcols: don't sort if cmpfunc() is not set
Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-18 10:47:22 +01:00
Karel Zak 7ad4b8503c libsmartcols: be sure column is unused
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-18 10:36:31 +01:00
Karel Zak 1bb767f54c Merge branch 'gh/254' of https://github.com/ignatenkobrain/util-linux 2016-01-18 10:24:39 +01:00
Karel Zak 28cbfdec21 Merge branch 'sym_is_hidden' of https://github.com/ignatenkobrain/util-linux
* 'sym_is_hidden' of https://github.com/ignatenkobrain/util-linux:
  libsmartcols: add scols_column_is_hidden into sym file
2016-01-18 10:16:36 +01:00
Yuriy M. Kaminskiy 5dc625b669 lsns: fix failure after zombie process
(At least on kernel 3.16), stat("/proc/${pid_of_zombie}/ns/mnt") returns
-ENOENT, as a result lsns stops scanning processes prematurely.
2016-01-18 10:08:02 +01:00
Igor Gnatenko ff43eabd30 AUTHORS: add Igor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-17 09:44:14 +01:00
Igor Gnatenko d10fa7e6dd libsmartcols: reflect changinging SCOLS_FL_TREE after adding to table
When scols_column_set_flags() is called we will compare before & after
status of SCOLS_FL_TREE flag and appropriately handle tb->ntreecols.

Reference: https://github.com/karelzak/util-linux/issues/254
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-17 09:44:09 +01:00
Igor Gnatenko a229e20478 libsmartcols: add scols_column_is_hidden into sym file
In commit 6d6b6d185e we forgot to
add this function to sym file and now we are getting
undefined symbol: scols_column_is_hidden

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-01-15 23:27:52 +01:00
Karel Zak 7ebbb9918e fstrim: add reference to blkdiscard
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-13 13:20:43 +01:00
Karel Zak 683ddbd5c4 column: ignore non-printable chars
echo -e '\033[33mb\033[mXFoo\n\033[33mbar\033[mXFoo' | column -s X -t

old version:

	b   Foo
	bar   Foo

fixed version:

	b    Foo
	bar  Foo

References: https://github.com/karelzak/util-linux/issues/252
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-13 10:08:39 +01:00
Karel Zak 6426f926ee lib/mbsalign: fix warnings when compile without widechars
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-13 10:08:13 +01:00
Karel Zak f12cd8d1e9 libblkid: use internally uint64_t for offsets and sizes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-12 18:42:10 +01:00
Karel Zak 95fb0ead2b lsblk: use unsigned type for SIZE
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-12 16:00:57 +01:00
Karel Zak 7837186515 libsmartcols: allow to set data by reference to libscols_column
References: https://github.com/karelzak/util-linux/issues/251
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-12 11:39:03 +01:00
Andrew Wilcox f136260aeb libfdisk: Add GPT type GUID for Itanium Linux root
References: http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
Signed-off-by: Andrew Wilcox <awilfox@adelielinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-12 10:35:11 +01:00
Peter Hoeg 1a2e4a94fc fstrim: systemd timer units should be WantedBy=timers.target
[kzak@redhat.com: - this configuration is recommended by systemd docs]

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-12 10:30:36 +01:00