patch-1.3.4 linux/kernel/time.c
Next file: linux/mm/kmalloc.c
Previous file: linux/kernel/sys.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Mon Jun 26 11:06:53 1995
- Orig file:
v1.3.3/linux/kernel/time.c
- Orig date:
Fri Jun 16 22:02:56 1995
diff -u --recursive --new-file v1.3.3/linux/kernel/time.c linux/kernel/time.c
@@ -122,31 +122,30 @@
*/
struct timezone sys_tz = { 0, 0};
-asmlinkage int sys_time(long * tloc)
+asmlinkage int sys_time(int * tloc)
{
int i, error;
i = CURRENT_TIME;
if (tloc) {
- error = verify_area(VERIFY_WRITE, tloc, 4);
+ error = verify_area(VERIFY_WRITE, tloc, sizeof(*tloc));
if (error)
return error;
- put_fs_long(i,(unsigned long *)tloc);
+ put_user(i,tloc);
}
return i;
}
-asmlinkage int sys_stime(unsigned long * tptr)
+asmlinkage int sys_stime(int * tptr)
{
- int error;
- unsigned long value;
+ int error, value;
if (!suser())
return -EPERM;
error = verify_area(VERIFY_READ, tptr, sizeof(*tptr));
if (error)
return error;
- value = get_fs_long(tptr);
+ value = get_user(tptr);
cli();
xtime.tv_sec = value;
xtime.tv_usec = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this