| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The compiler had not complained here because both macros are
probably the same.
But gettext issued a funny warning:
sys-utils/chmem.c:67: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive.
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix compiler warnings seen on Linux/i586 and OSX/travis.
#type #format #cast
unsigned long %lu -
uint64_t PRIu64 -
fdisk_sector_t %ju (uintmax_t)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 'hwclock-date7-3' of github.com:jwpi/util-linux:
hwclock: remove unused 'silent' arg
hwclock: remove dead cmos code
hwclock: improve cmos message strings
hwclock: remove unused atomic arg in cmos
hwclock: remove unused cmos ctl structs
hwclock: remove alpha cmos
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The 'silent' argument for get_epoch_rtc() was used
to silence error messages when querying the rtc
driver for an alpha epoch while using cmos direct
access. Alpha cmos has since been removed so
'silent' is no longer used.
* sys-utils/hwclock.h: remove 'silent' argument
* sys-utils/hwclock.c: same
* sys-utils/hwclock-rtc.c: same
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
| |
| |
| |
| |
| |
| | |
* hwclock-cmos.c: remove unused 'century' code.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
| |
| |
| |
| |
| |
| | |
* sys-utils/hwclock-cmos.c: improve message strings
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
| |
| |
| |
| |
| |
| | |
* sys-utils/hwclock-cmos.c: remove unused arg for atomic()
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The hwclock-cmos.c ctl structs were only used for
the since removed alpha code.
* sys-utils/hwclock-cmos.c: remove unused ctl structs
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove alpha direct I/O access, use RTC instead:
http://marc.info/?l=util-linux-ng&m=141682406902804
Resolves the alpha 2020 issue for util-linux:
http://marc.info/?l=util-linux-ng&m=148387021519787
Now it is only the kernel's RTC problem.
* sys-utils/hwclock.c: remove alpha cmos
* sys-utils/hwclock-cmos.c: same
* sys-utils/hwclock.h: same
* sys-utils/hwclock.8.in: same
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
https://github.com/rudimeier/util-linux
* 'fix-ipcs-shmall-overflow' of https://github.com/rudimeier/util-linux:
ipcs: make shmall overflow a bit less worse
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Still no large integer support but on overflow we print now
the largest possible value, maybe even the largest one which
makes sense at all.
So on x86_64 systems we'll see now:
$ echo "4503599627370496" > /proc/sys/kernel/shmall
$ ipcs -m -l | grep "max total"
max total shared memory (kbytes) = 18014398509481980
rather than this:
$ ipcs -m -l | grep "max total"
max total shared memory (kbytes) = 0
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reorder options to match onboard help and group functionally.
Include some missing optional arguments.
[kzak@redhat.com: - don't include available columns in man page,
- add comments to the usage()
- fix order in usage()
- fix typo in usage()]
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|/
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the 1994 Award BIOS bug workaround as
previously discussed more than two years ago:
http://marc.info/?l=util-linux-ng&m=141682406902804&w=2
* sys-utils/hwclock.c: remove badyear option
* sys-utils/hwclock.h: same
* sys-utils/hwclock.8.in: same
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Let's fallback to attribute files if mm_stat file is incomplete. It
should not happen, but I have seen RHEL7 kernel where is no
num_migrated/pages_compacted attribute...
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
* sys-utils/hwclock-rtc.c: try to open the 'new' rtc class driver first.
* sys-utils/hwclock.8.in: document this.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
* jwpi/hwclock-date7:
lib: add parse-date documentation
hwclock: use parse_date function
build-sys: add parse-date.y
lib: add parse-date.y
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Documentation/parse-date.txt - new file
* sys-utils/hwclock.8.in
Fix the --date option description.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* hwclock.c: replace interpret_date_string() with parse_date().
Eliminates shell injection vulnerability from popen() date(1).
Removes system dependency on date(1).
Reduction in hwclock execution time.
Significant cleanup of hwclock.c code.
* Bug fix for "hwclock --predict --date 'bad_date'" printing:
hwclock: No usable set-to time. Cannot set clock.
The message now matches date(1) for an invalid --date argument.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|/
|
|
|
| |
Addresses: https://github.com/karelzak/util-linux/issues/419
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1390057
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
and fix typo in man page
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The length option is used to specify the number of zones to
operate on. To be more consistent with other tools, have this
option use a number of sectors and introduce the --count option
to allow users to specify a number of zones.
The --count and --length options cannot be used together on
the command line.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add "0x" to the zone start, length and write pointer print
to make it always clear that the values are Hexadecimal.
Also update the zone condition string and associated comments
to match more closely the wording in the standard document.
The man page is also updated to match the new wording.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
|
|
|
|
|
|
|
|
|
| |
Report all zones of the block device when length is not specified
on the command line. To do this, introduce an inner loop in
blkzone_report to repeatedly issue report zone ioctl to the
device.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
|
|
|
|
|
|
|
| |
If length is 0, operate on all zones starting from offset.
This also fix the maximum length calculation from offset.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
This new command is based on the original implementation of blkreport
and blkreset command.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be
static?
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer
Since many 'struct option' has used zero as NULL make them more readable in
same go by reindenting, and using named argument requirements.
Reference: https://lwn.net/Articles/93577/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Tell in manual page what ZAC and ZBC acronyms mean. Include explanation to
blkreport output, so that users do not need to search source code to
understand what the tool informed. And fix couple dot double space issues.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
| |
Set variables read-only where possible. Fix few code style issues, mostly
with spacing. Avoid initializing variables if they are never read before
next update. Remove "ERR: %d -> %s" message that repeated system error
three times, twice in that message and once at end of main that is the only
of these three left in place.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
|
|
|
|
|
|
|
| |
* "LBA" sounds confusing
Reported-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
* "LBA" sounds confusing
* alignment check is unnecessary for report ioctl
Reported-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Each option plus its description should be a separate translatable
string. And, if all is well, blkreport should not discard anything
-- that is: fix the cut-and-paste error from blkdiscard.
Additionally, tweak some wordings.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds:
- blkreset to issue Reset (Write Pointer) zone commands
- blkreport to retrieve drive zone information
[kzak@redhat.com: - cleanup man page and usage()
- remove command line options aliases,
- use strtosize_or_err()
- remove unnecessary -ludev
- use blkdev.h stuff]
Signed-off-by: Shaun Tancheff <shaun@tancheff.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
git://github.com/kerolasa/lelux-utiliteetit
* 'hwclock-jwp-reviewed' of git://github.com/kerolasa/lelux-utiliteetit: (25 commits)
hwclock: remove --compare option
hwclock: remove trailing dot from messages that include system error message
hwclock: make --date=argument less prone to injection
hwclock: fix rtc atexit registration
hwclock: clarify cmos inb and outb preprocessor directives
hwclock: try RTCGET and RTCSET only when normal rtc fails
hwclock: stream line synchronize_to_clock_tick_rtc()
hwclock: improve coding style
hwclock: remove division by zero [asan]
hwclock: add debugging to open_rtc()
hwclock: remove magic constants from interpret_date_string()
hwclock: use symbolic magic values passed in between functions
hwclock: initialize struct adjtime members
hwclock: alloate date_resp parsing buffer in interpret_date_string()
hwclock: simplify save_adjtime() execution flow
hwclock: remove dead code and other minor fixes
hwclock: move error messages to determine_clock_access_method()
hwclock: clarify set_cmos_epoch() code
hwclock: move command-line options to control structure
hwclock: remove unnecessary type casts
...
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Compare functionality was printing nonsense values. There is no knowledge
of anyone using this broken functionality. Instead of deprecating the code
for months, and removing it after few release, it is removed immediately.
Needless to say this is unusual removal.
Reference: http://marc.info/?l=util-linux-ng&m=148396210506652&w=2
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change should not improve security much. One hopes hwclock --set is
restricted for root only. Where hwclock is allowed to run via sudo, or has
setuid setup, there is a pretty easy privilege escalation via subshell.
$ sudo ./hwclock --set --date='2000-10-20$(touch /tmp/hwclock.inject)'
Reviewed-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 27f9db17bd57b85947445c03e2cd9dda36ca377f missed a minus sign from
comparison.
Reviewed-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| | |
The cmos only works when architecture is i386, x86_64, or alpha.
Reviewed-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The RTCGET and RTCSET are in use for sparcs with sbus, so try them as
fallback rather than always.
Reference: https://github.com/torvalds/linux/blob/master/fs/compat_ioctl.c#L967-L974
Reviewed-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|