Commit 97309749 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] add compat_utimes

Add compat_sys_utimes for 32bit->64bit utimes conversion
parent 91a8b0c4
...@@ -53,6 +53,19 @@ asmlinkage long compat_sys_utime(char *filename, struct compat_utimbuf *t) ...@@ -53,6 +53,19 @@ asmlinkage long compat_sys_utime(char *filename, struct compat_utimbuf *t)
return do_utimes(filename, t ? tv : NULL); return do_utimes(filename, t ? tv : NULL);
} }
asmlinkage long compat_sys_utimes(char *filename, struct compat_timeval *t)
{
struct timeval tv[2];
if (t) {
if (get_user(tv[0].tv_sec, &t[0].tv_sec) ||
get_user(tv[0].tv_usec, &t[0].tv_usec) ||
get_user(tv[1].tv_sec, &t[1].tv_sec) ||
get_user(tv[1].tv_usec, &t[1].tv_usec))
return -EFAULT;
}
return do_utimes(filename, t ? tv : NULL);
}
asmlinkage long compat_sys_newstat(char * filename, asmlinkage long compat_sys_newstat(char * filename,
struct compat_stat *statbuf) struct compat_stat *statbuf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment