Bug 30918

Summary: hwclock в случае ошибки возвращает 0
Product: Branch p8 Reporter: kharpost <kharpost>
Component: hwclockAssignee: Andrey Cherepanov <cas>
Status: CLOSED WONTFIX QA Contact: qa-p8 <qa-p8>
Severity: normal    
Priority: P3 CC: grenka, grenka
Version: не указана   
Hardware: x86_64   
OS: Linux   

Description kharpost@altlinux.org 2015-04-07 08:14:47 MSK
hwclock в случае ошибки возвращает код завершения 0

[user@eee2 avrlib 07:54:48]$ sudo hwclock --test; echo errorcode=$?
Tue Apr  7 07:55:09 2015  -0.782270 seconds
errorcode=0
[user@eee2 avrlib 07:55:08]$ sudo hwclock --tet; echo errorcode=$? 
hwclock: unrecognized option '--tet'

Usage:
 hwclock [function] [option...]

Functions:
 -h, --help           show this help text and exit
 -r, --show           read hardware clock and print result
     --set            set the RTC to the time given with --date
 -s, --hctosys        set the system time from the hardware clock
 -w, --systohc        set the hardware clock from the current system time
     --systz          set the system time based on the current timezone
     --adjust         adjust the RTC to account for systematic drift since
                        the clock was last set or adjusted
     --getepoch       print out the kernel's hardware clock epoch value
     --setepoch       set the kernel's hardware clock epoch value to the 
                        value given with --epoch
     --predict        predict RTC reading at time given with --date
 -V, --version        display version information and exit

Options:
 -u, --utc            the hardware clock is kept in UTC
     --localtime      the hardware clock is kept in local time
 -f, --rtc <file>     special /dev/... file to use instead of default
     --directisa      access the ISA bus directly instead of /dev/rtc
     --badyear        ignore RTC's year because the BIOS is broken
     --date <time>    specifies the time to which to set the hardware clock
     --epoch <year>   specifies the year which is the beginning of the
                        hardware clock's epoch value
     --noadjfile      do not access /etc/adjtime; this requires the use of
                        either --utc or --localtime
     --adjfile <file> specifies the path to the adjust file;
                        the default is /etc/adjtime
     --test           do not update anything, just show what would happen
 -D, --debug          debugging mode

errorcode=0
Comment 1 Grigory Ustinov 2017-12-21 21:01:32 MSK
В p8 бага есть, в сизифе исправлено.
Comment 2 Grigory Ustinov 2020-02-20 15:57:15 MSK
В p9 исправлено. Обновляйтесь.