blob: 17dae1d9dffa38846f6de51ad05d786c80ea4a37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
diff -NurpP linux-2.6.16.17-vs2.1.1-rc21.3/include/linux/vs_time.h linux-2.6.16.17-vs2.1.1-rc21.4/include/linux/vs_time.h
--- linux-2.6.16.17-vs2.1.1-rc21.3/include/linux/vs_time.h 2006-05-29 18:03:54 +0200
+++ linux-2.6.16.17-vs2.1.1-rc21.4/include/linux/vs_time.h 2006-05-31 01:27:45 +0200
@@ -7,7 +7,7 @@
#ifdef CONFIG_VSERVER_VTIME
extern void vx_gettimeofday(struct timeval *tv);
-extern int vx_settimeofday(struct timeval *tv);
+extern int vx_settimeofday(struct timespec *ts);
#else
#define vx_gettimeofday(t) do_gettimeofday(t)
diff -NurpP linux-2.6.16.17-vs2.1.1-rc21.3/kernel/vserver/cvirt.c linux-2.6.16.17-vs2.1.1-rc21.4/kernel/vserver/cvirt.c
--- linux-2.6.16.17-vs2.1.1-rc21.3/kernel/vserver/cvirt.c 2006-05-29 18:04:24 +0200
+++ linux-2.6.16.17-vs2.1.1-rc21.4/kernel/vserver/cvirt.c 2006-05-31 01:29:12 +0200
@@ -278,18 +278,18 @@ void vx_gettimeofday(struct timeval *tv)
}
}
-int vx_settimeofday(struct timeval *tv)
+int vx_settimeofday(struct timespec *ts)
{
- struct timeval tvs;
+ struct timeval tv;
if (!vx_flags(VXF_VIRT_TIME, 0))
- return do_settimeofday(tv);
+ return do_settimeofday(ts);
- do_gettimeofday(&tvs);
+ do_gettimeofday(&tv);
current->vx_info->cvirt.bias_tv.tv_sec =
- tv->tv_sec - tvs.tv_sec;
+ ts->tv_sec - tv.tv_sec;
current->vx_info->cvirt.bias_tv.tv_usec =
- tv->tv_usec - tvs.tv_usec;
+ (ts->tv_nsec/NSEC_PER_USEC) - tv.tv_usec;
return 0;
}
|