syscall.c (8a84fc15ae5cafcc366dd85cf8e1ab2040679abc) syscall.c (e9ff3990f08e9a0c2839cc22808b01732ea5b3e4)
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 217 unchanged lines hidden (view full) ---

226 return error;
227}
228
229/*
230 * Compacrapability ...
231 */
232asmlinkage int sys_uname(struct old_utsname __user * name)
233{
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 217 unchanged lines hidden (view full) ---

226 return error;
227}
228
229/*
230 * Compacrapability ...
231 */
232asmlinkage int sys_uname(struct old_utsname __user * name)
233{
234 if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))
234 if (name && !copy_to_user(name, utsname(), sizeof (*name)))
235 return 0;
236 return -EFAULT;
237}
238
239/*
240 * Compacrapability ...
241 */
242asmlinkage int sys_olduname(struct oldold_utsname __user * name)
243{
244 int error;
245
246 if (!name)
247 return -EFAULT;
248 if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
249 return -EFAULT;
250
235 return 0;
236 return -EFAULT;
237}
238
239/*
240 * Compacrapability ...
241 */
242asmlinkage int sys_olduname(struct oldold_utsname __user * name)
243{
244 int error;
245
246 if (!name)
247 return -EFAULT;
248 if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
249 return -EFAULT;
250
251 error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
252 error -= __put_user(0,name->sysname+__OLD_UTS_LEN);
253 error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
254 error -= __put_user(0,name->nodename+__OLD_UTS_LEN);
255 error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
256 error -= __put_user(0,name->release+__OLD_UTS_LEN);
257 error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
258 error -= __put_user(0,name->version+__OLD_UTS_LEN);
259 error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
260 error = __put_user(0,name->machine+__OLD_UTS_LEN);
251 error = __copy_to_user(&name->sysname, &utsname()->sysname,
252 __OLD_UTS_LEN);
253 error -= __put_user(0, name->sysname + __OLD_UTS_LEN);
254 error -= __copy_to_user(&name->nodename, &utsname()->nodename,
255 __OLD_UTS_LEN);
256 error -= __put_user(0, name->nodename + __OLD_UTS_LEN);
257 error -= __copy_to_user(&name->release, &utsname()->release,
258 __OLD_UTS_LEN);
259 error -= __put_user(0, name->release + __OLD_UTS_LEN);
260 error -= __copy_to_user(&name->version, &utsname()->version,
261 __OLD_UTS_LEN);
262 error -= __put_user(0, name->version + __OLD_UTS_LEN);
263 error -= __copy_to_user(&name->machine, &utsname()->machine,
264 __OLD_UTS_LEN);
265 error = __put_user(0, name->machine + __OLD_UTS_LEN);
261 error = error ? -EFAULT : 0;
262
263 return error;
264}
265
266asmlinkage int sys_set_thread_area(unsigned long addr)
267{
268 struct thread_info *ti = task_thread_info(current);

--- 135 unchanged lines hidden ---
266 error = error ? -EFAULT : 0;
267
268 return error;
269}
270
271asmlinkage int sys_set_thread_area(unsigned long addr)
272{
273 struct thread_info *ti = task_thread_info(current);

--- 135 unchanged lines hidden ---