* [PATCH] ntp: fix return value of adjtimex() calling for STA_INS/DEL
@ 2012-11-20 8:21 Seiichi Ikarashi
0 siblings, 0 replies; only message in thread
From: Seiichi Ikarashi @ 2012-11-20 8:21 UTC (permalink / raw)
To: John Stultz, John Stultz; +Cc: Thomas Gleixner, linux-kernel
Hi,
Since commit 6b43ae8a619d17c4935c3320d2ef9e92bdeed05d,
adjtimex() system call returns TIME_OK even if STA_INS/DEL calling.
But the man page says it should be TIME_INS/TIME_DEL, respectively.
I have no idea except for such an ad-hoc fix.
Signed-off-by: Seiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
--- a/kernel/time/ntp.c 2012-11-20 17:09:08.000000000 +0900
+++ b/kernel/time/ntp.c 2012-11-20 17:13:18.000000000 +0900
@@ -684,6 +684,10 @@ int do_adjtimex(struct timex *txc)
}
result = time_state; /* mostly `TIME_OK' */
+ if (time_status & STA_INS)
+ result = TIME_INS;
+ else if (time_status & STA_DEL)
+ result = TIME_DEL;
/* check for errors */
if (is_error_status(time_status))
result = TIME_ERROR;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-20 8:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-20 8:21 [PATCH] ntp: fix return value of adjtimex() calling for STA_INS/DEL Seiichi Ikarashi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox