patch-1.3.46 linux/drivers/char/lp.c

Next file: linux/drivers/net/3c501.c
Previous file: linux/drivers/char/console.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.45/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -503,6 +503,16 @@
 					memset(&LP_STAT(minor), 0, sizeof(struct lp_stats));
 			}
 			break;
+ 		case LPGETFLAGS:
+ 			retval = verify_area(VERIFY_WRITE, (void *) arg,
+ 			    sizeof(int));
+ 		    	if (retval)
+ 		    		return retval;
+ 			else {
+ 				int status = LP_F(minor);
+				memcpy_tofs((int *) arg, &status, sizeof(int));
+			}
+			break;
 		default:
 			retval = -EINVAL;
 	}

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