Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
For findmnt(8) output we mix static and libmount data together with
in-findmnt allocated buffers. This patch cleanup all and use allocated
buffers for all output. All is deallocated by tt_free_table().
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
[kzak@redhat.com: - move BLKID_SUBLKS_BADCSUM login to
blkid_probe_verify_csum()]
Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
This is necessary for paranoid security guys who believe that things
like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the
world a safer place...
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The device (for example LVM logical volume) could be renamed and then
the device name from /proc/self/mountinfo does not match with reality.
So, we also need to check devno. Unfortunately we cannot completely
rely on devno, because for example btrfs uses psudo device numbers.
References: https://bugzilla.redhat.com/show_bug.cgi?id=980463
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
$ findmnt -rn --target /home/kzak/.bashrc -o UUID
uses libudev to ask for UUID, unfortunately /home/kzak is DM device
and libudev expects sysfs-like names (e.g. dm-0). We have to convert
the name to kernel devname.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Update sd-damoen.[hc] files from systemd upstream, using commit
fa3868c6d317b88715c55422b898f9070afe6575 as the sync point.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
This change allows to exclude for example NFS mountpoint:
findmnt --fstab --target /mnt/foo --type nonfs
to stall on a stalled nfs mount.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
... in the yearly() function is a static buffer where is not space for
multibyte headers. The patch also clean ups function where we
initialize headers.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Reported-by: Petr Písař <petr.pisar@atlas.cz>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
Sloppiness from commit e44fe4712140774b677de466affc31e0581ee335.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
This patch adds a new option to logger that will make it look for a
priority prefix <n> at the beginning of every line. The priority is
a single decimal number formed as explained in syslog(3).
If a prefix is found logger will log the message using the found
facility and level in that prefix, if the prefix doesn't contain a
facility the default facility specified by the -p option will be used.
If no prefix is found, logger will use the priority specified by -p.
[kzak@redhat.com: - add --prio-prefix to usage() output]
Signed-off-by: Dennis H Jensen <dennis.h.jensen@siemens.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
- use static for all global variables
- use REFORMATION_YEAR macro
- make if() lines more readable
- etc.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 'cal-fourth' of git://github.com/kerolasa/lelux-utiliteetit:
docs: cal: stop telling year 9999 is upper limit
tests: check cal works when year is far in future
cal: remove arbitrary limit of maxium year being 9999
cal: use Claus Tøndering's day of the week algorithm
cal: simplify day_in_week() calculation
cal: mark all functions static
cal: stop trimming whitespaces
tests: add cal day color corner cases
docs: cal: add --color option description to manual page
cal: add --color to usage()
cal: support --color[={auto,always,never}]
cal: de-duplicate julian specific functions
cal: remove unnecessary initializations
cal: simplify calendar reformat calculations
tests: add calendar reformation check
cal: clean up use of constants
cal: convert function like definitions to functions
cal: fix preprocessor directive indendation
|
|
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
The change limits year to be unsigned long. In case a year + month name
exceed a column width two lines are used for them.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Reference: http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week#T.C3.B8ndering.27s_algorithm
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
The day_in_week() can be made easier to read, and should return invalid
weekday at the time of missing 11 days at September 1752.
Reported-by: Thomas Bächler <thomas@archlinux.org>
References: http://www.spinics.net/lists/util-linux-ng/msg07910.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Proposed-by: Dave Reisner <dreisner@archlinux.org>
Reference: http://marc.info/?l=util-linux-ng&m=136717012419551&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Remove trailing spaces from output it is trivial
cal | sed 's/ *$//'
but padding them back is difficult.
CC: Pádraig Brady <P@draigbrady.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
And clean up the usage() function.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Similar with dmesg commit 9bc2b51a06dc9cf6244106ac489ab08a91fd4360.
CC: Pádraig Brady <P@draigBrady.com>
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
The cost is a little bit more complex functions, while the benefit is
couple data flows fewer to mind about.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
The only September 1752 offset calculation that is necessary is whether
Sun or Mon is the first day of the week.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
The commit also adds few new symbolic names, such as DAYS_IN_WEEK. While
these definitions may look a little too trivial to have I am sure they
ease understanding what is going on in code where they are used.
Reviewed-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Reviewed-by: Thomas Bächler <thomas@archlinux.org>
Reviewed-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
And code within the blocks selected by preprocessor to be live code.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The standard format is to seperate each entry with a comma, and
for each one to be on a line by itself. Most util-linux pages
follow this, but a few do not.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
... to return short serial number of the disk (from udev db)
Addresses: https://github.com/karelzak/util-linux/issues/33
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
This is C, use int & bits for boolean stuff rather than army of
variables.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
[kzak@redhat.com: - don't wipe if failed to create a backup file
- use ts_scsi_debug_init in the regression tests]
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|