patch-2.1.4 linux/drivers/char/lp.c
Next file: linux/drivers/char/lp_m68k.c
Previous file: linux/drivers/char/istallion.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Sun Oct 13 21:11:11 1996
- Orig file:
v2.1.3/linux/drivers/char/lp.c
- Orig date:
Mon Sep 30 10:52:46 1996
diff -u --recursive --new-file v2.1.3/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -171,7 +171,7 @@
do {
bytes_written = 0;
copy_size = (count <= LP_BUFFER_SIZE ? count : LP_BUFFER_SIZE);
- memcpy_fromfs(lp->lp_buffer, buf, copy_size);
+ copy_from_user(lp->lp_buffer, buf, copy_size);
while (copy_size) {
if (lp_char_interrupt(lp->lp_buffer[bytes_written], minor)) {
@@ -237,7 +237,7 @@
temp = buf;
while (count > 0) {
- c = get_user(temp);
+ get_user(c, temp);
retval = lp_char_polled(c, minor);
/* only update counting vars if character was printed */
if (retval) {
@@ -479,7 +479,7 @@
sizeof(int));
if (retval)
return retval;
- memcpy_tofs((int *) arg, &LP_IRQ(minor), sizeof(int));
+ copy_to_user((int *) arg, &LP_IRQ(minor), sizeof(int));
break;
case LPGETSTATUS:
retval = verify_area(VERIFY_WRITE, (void *) arg,
@@ -488,7 +488,7 @@
return retval;
else {
int status = LP_S(minor);
- memcpy_tofs((int *) arg, &status, sizeof(int));
+ copy_to_user((int *) arg, &status, sizeof(int));
}
break;
case LPRESET:
@@ -500,7 +500,7 @@
if (retval)
return retval;
else {
- memcpy_tofs((int *) arg, &LP_STAT(minor), sizeof(struct lp_stats));
+ copy_to_user((int *) arg, &LP_STAT(minor), sizeof(struct lp_stats));
if (suser())
memset(&LP_STAT(minor), 0, sizeof(struct lp_stats));
}
@@ -512,7 +512,7 @@
return retval;
else {
int status = LP_F(minor);
- memcpy_tofs((int *) arg, &status, sizeof(int));
+ copy_to_user((int *) arg, &status, sizeof(int));
}
break;
default:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov