[PATCH] UML: fix uptime
The use of signed instead of unsigned here broke the calculations on negative numbers that are involved in calculating wall_to_monotonic. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
This commit is contained in:
@@ -87,7 +87,7 @@ void timer_irq(union uml_pt_regs *regs)
|
||||
|
||||
void time_init_kern(void)
|
||||
{
|
||||
unsigned long long nsecs;
|
||||
long long nsecs;
|
||||
|
||||
nsecs = os_nsecs();
|
||||
set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION,
|
||||
|
||||
Reference in New Issue
Block a user