[BusyBox-cvs] busybox/util-linux hwclock.c,1.10,1.11

Robert Griebl sandman at busybox.net
Sun Mar 21 18:01:48 UTC 2004


Update of /var/cvs/busybox/util-linux
In directory nail:/tmp/cvs-serv23863

Modified Files:
	hwclock.c 
Log Message:
The utc variable was not modified according to the -u/-l command line 
parameters.


Index: hwclock.c
===================================================================
RCS file: /var/cvs/busybox/util-linux/hwclock.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- a/hwclock.c	15 Mar 2004 08:29:21 -0000	1.10
+++ b/hwclock.c	21 Mar 2004 18:01:46 -0000	1.11
@@ -213,10 +213,16 @@
 	}
 
 	/* If -u or -l wasnt give check if we are using utc */
-	if ((opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) == 0) {
+	if (opt & HWCLOCK_OPT_UTC) {
+		utc = 1;
+	}
+	else if (opt & HWCLOCK_OPT_LOCALTIME) {
+		utc = 0;
+	}
+	else {
 		utc = check_utc();
 	}
-
+	
 	if (opt & HWCLOCK_OPT_HCTOSYS) {
 		return to_sys_clock ( utc );
 	}




More information about the busybox-cvs mailing list