mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ntp: fix ADJ_OFFSET_SS_READ bug and do_adjtimex() cleanup
Thanks to the review by Michael Kerrisk a bug in the recent ADJ_OFFSET_SS_READ option was discovered, where the ntp time_offset was inadvertently set by it. This fixes this by making the adjtime code more separate from the ntp_adjtime code (both of which really want to be separate syscalls). Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
6a55617ed5
commit
916c7a8551
2 changed files with 48 additions and 37 deletions
|
@ -141,8 +141,15 @@ struct timex {
|
|||
#define ADJ_MICRO 0x1000 /* select microsecond resolution */
|
||||
#define ADJ_NANO 0x2000 /* select nanosecond resolution */
|
||||
#define ADJ_TICK 0x4000 /* tick value */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define ADJ_ADJTIME 0x8000 /* switch between adjtime/adjtimex modes */
|
||||
#define ADJ_OFFSET_SINGLESHOT 0x0001 /* old-fashioned adjtime */
|
||||
#define ADJ_OFFSET_READONLY 0x2000 /* read-only adjtime */
|
||||
#else
|
||||
#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
|
||||
#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
|
||||
#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
|
||||
#endif
|
||||
|
||||
/* xntp 3.4 compatibility names */
|
||||
#define MOD_OFFSET ADJ_OFFSET
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue