adjtimex should treat -f as signed, not unsigned (with patch)
Clem Taylor
clem.taylor at gmail.com
Tue Mar 13 17:57:34 PDT 2007
I'm using a snapshot from 2007.03.12. The adjtimex applet isn't
accepting negative numbers for the frequency parameter:
adjtimex -q -f -9886616
adjtimex: invalid number '-9886616'
The frequency field should be postive to make the clock run faster and
negative to make the clock run slower. Note, this was working in
1.2.1.
I think the fix should just be:
--- busybox/miscutils/adjtimex.c.orig
+++ busybox/miscutils/adjtimex.c
@@ -60,5 +60,5 @@
}
if (opt & 0x4) { // -f
- txc.freq = xatou(opt_f);
+ txc.freq = xatoi(opt_f);
txc.modes |= ADJ_FREQUENCY;
}
More information about the busybox
mailing list