busybox/util-linux
Andrej Picej d70256a5c7 hwclock: add get/set parameters option
In kernel 5.16 special ioctls were introduced to get/set RTC parameters.
Add option to get/set parameters into busybox version of hwclock.
Implementation is similar to the one already used in linux-utils hwclock
tool.

Example of parameter get use:
$ hwclock -g 2
The RTC parameter 0x2 is set to 0x2.
$ hwclock --param-get bsm
The RTC parameter 0x2 is set to 0x2.

Example of parameter set use:
$ hwclock -p 2=1
The RTC parameter 0x2 will be set to 0x1.
$ hwclock -p bsm=2
The RTC parameter 0x2 will be set to 0x2.

function                                             old     new   delta
hwclock_main                                         298     576    +278
.rodata                                           105231  105400    +169
packed_usage                                       34541   34576     +35
static.hwclock_longopts                               60      84     +24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 506/0)             Total: 506 bytes

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-07-12 16:27:49 +02:00
..
volume_id decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
acpid.c Update applet size estimates 2023-07-10 17:25:21 +02:00
blkdiscard.c Update applet size estimates 2023-07-10 17:25:21 +02:00
blkid.c Remove "select PLATFORM_LINUX" 2022-11-29 14:14:06 +01:00
blockdev.c Update applet size estimates 2023-07-10 17:25:21 +02:00
cal.c Update applet size estimates 2023-07-10 17:25:21 +02:00
chrt.c Update applet size estimates 2023-07-10 17:25:21 +02:00
Config.src restore documentation on the build config language 2018-06-06 15:16:48 +02:00
dmesg.c Update applet size estimates 2023-07-10 17:25:21 +02:00
eject.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fallocate.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fatattr.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fbset.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fdformat.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fdisk.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fdisk_aix.c fdisk_aix: fix aliasing warning, comment out unused global variables 2019-10-04 17:16:15 +02:00
fdisk_gpt.c libbb: introduce and use fputs_stdout 2021-02-03 20:52:40 +01:00
fdisk_osf.c libbb: code shrink: introduce and use [_]exit_FAILURE() 2023-06-15 11:55:56 +02:00
fdisk_sgi.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
fdisk_sun.c *: add more beneficial NOINLINEs 2021-10-10 14:32:05 +02:00
findfs.c Update applet size estimates 2023-07-10 17:25:21 +02:00
flock.c Update applet size estimates 2023-07-10 17:25:21 +02:00
freeramdisk.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fsck_minix.c libbb: code shrink: introduce and use [_]exit_SUCCESS() 2022-01-05 22:16:06 +01:00
fsfreeze.c Update applet size estimates 2023-07-10 17:25:21 +02:00
fstrim.c Update applet size estimates 2023-07-10 17:25:21 +02:00
getopt.c Update applet size estimates 2023-07-10 17:25:21 +02:00
hexdump.c Update applet size estimates 2023-07-10 17:25:21 +02:00
hexdump_xxd.c Update applet size estimates 2023-07-10 17:25:21 +02:00
hwclock.c hwclock: add get/set parameters option 2023-07-12 16:27:49 +02:00
ionice.c Update applet size estimates 2023-07-10 17:25:21 +02:00
ipcrm.c Update applet size estimates 2023-07-10 17:25:21 +02:00
ipcs.c Update applet size estimates 2023-07-10 17:25:21 +02:00
Kbuild.src Convert all util-linux/* applets to "new style" applet definitions 2016-11-23 11:46:32 +01:00
last.c Update applet size estimates 2023-07-10 17:25:21 +02:00
last_fancy.c libbb: factor out fflush_stdout_and_exit(EXIT_SUCCESS) 2022-01-04 23:31:58 +01:00
losetup.c Update applet size estimates 2023-07-10 17:25:21 +02:00
lspci.c Update applet size estimates 2023-07-10 17:25:21 +02:00
lsusb.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mdev.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mesg.c Update applet size estimates 2023-07-10 17:25:21 +02:00
minix.h more bionic fixes 2016-03-14 19:34:15 +01:00
mkfs_ext2.c Remove "select PLATFORM_LINUX" 2022-11-29 14:14:06 +01:00
mkfs_ext2.txt mkfs_ext2: use compatible inode sizes; add -I <inodesize>. (by Vladimir) 2009-10-22 12:12:17 +02:00
mkfs_ext2_test.sh fix more instances of ": $((a++))" in shell scripts 2017-07-15 19:20:45 +02:00
mkfs_minix.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mkfs_reiser.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
mkfs_vfat.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mkswap.c Update applet size estimates 2023-07-10 17:25:21 +02:00
more.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mount.c Update applet size estimates 2023-07-10 17:25:21 +02:00
mountpoint.c Update applet size estimates 2023-07-10 17:25:21 +02:00
nologin.c nologin: make it possible to build it as single applet 2020-06-24 15:05:22 +02:00
nsenter.c Update applet size estimates 2023-07-10 17:25:21 +02:00
pivot_root.c Update applet size estimates 2023-07-10 17:25:21 +02:00
rdate.c Update applet size estimates 2023-07-10 17:25:21 +02:00
rdev.c Update applet size estimates 2023-07-10 17:25:21 +02:00
readprofile.c Update applet size estimates 2023-07-10 17:25:21 +02:00
renice.c Update applet size estimates 2023-07-10 17:25:21 +02:00
rev.c Update applet size estimates 2023-07-10 17:25:21 +02:00
rtcwake.c Update applet size estimates 2023-07-10 17:25:21 +02:00
script.c Update applet size estimates 2023-07-10 17:25:21 +02:00
scriptreplay.c Update applet size estimates 2023-07-10 17:25:21 +02:00
setarch.c Update applet size estimates 2023-07-10 17:25:21 +02:00
setpriv.c Update applet size estimates 2023-07-10 17:25:21 +02:00
setsid.c Update applet size estimates 2023-07-10 17:25:21 +02:00
swaponoff.c Remove "select PLATFORM_LINUX" 2022-11-29 14:14:06 +01:00
switch_root.c Update applet size estimates 2023-07-10 17:25:21 +02:00
taskset.c Update applet size estimates 2023-07-10 17:25:21 +02:00
uevent.c Update applet size estimates 2023-07-10 17:25:21 +02:00
umount.c help text: replace [OPTIONS] with actual options (if not too long) 2020-12-13 22:34:05 +01:00
unshare.c Update applet size estimates 2023-07-10 17:25:21 +02:00
wall.c Update applet size estimates 2023-07-10 17:25:21 +02:00