patch-2.4.19 linux-2.4.19/kernel/time.c
Next file: linux-2.4.19/kernel/timer.c
Previous file: linux-2.4.19/kernel/sysctl.c
Back to the patch index
Back to the overall index
-  Lines: 12
-  Date:
Fri Aug  2 17:39:46 2002
-  Orig file: 
linux-2.4.18/kernel/time.c
-  Orig date: 
Mon Feb 25 11:38:13 2002
diff -urN linux-2.4.18/kernel/time.c linux-2.4.19/kernel/time.c
@@ -216,6 +216,11 @@
 		
 	/* Now we validate the data before disabling interrupts */
 
+	if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT)
+	  /* singleshot must not be used with any other mode bits */
+		if (txc->modes != ADJ_OFFSET_SINGLESHOT)
+			return -EINVAL;
+
 	if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET))
 	  /* adjustment Offset limited to +- .512 seconds */
 		if (txc->offset <= - MAXPHASE || txc->offset >= MAXPHASE )
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)