patch-2.4.0-test8 linux/drivers/char/nvram.c
Next file: linux/drivers/char/pc_keyb.c
Previous file: linux/drivers/char/ftape/lowlevel/ftape-tracing.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Sat Aug 26 16:24:58 2000
- Orig file:
v2.4.0-test7/linux/drivers/char/nvram.c
- Orig date:
Fri Jul 14 12:12:09 2000
diff -u --recursive --new-file v2.4.0-test7/linux/drivers/char/nvram.c linux/drivers/char/nvram.c
@@ -246,7 +246,8 @@
spin_unlock_irq (&rtc_lock);
- copy_to_user_ret (buf, contents, tmp - contents, -EFAULT);
+ if (copy_to_user (buf, contents, tmp - contents))
+ return -EFAULT;
*ppos = i;
@@ -264,10 +265,9 @@
unsigned i = *ppos;
char * tmp;
- /* could comebody please help me indent this better? */
- copy_from_user_ret (contents, buf, (NVRAM_BYTES - i) < count ?
- (NVRAM_BYTES - i) : count,
- -EFAULT);
+ if (copy_from_user (contents, buf, (NVRAM_BYTES - i) < count ?
+ (NVRAM_BYTES - i) : count))
+ return -EFAULT;
spin_lock_irq (&rtc_lock);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)