patch-2.3.3 linux/drivers/block/paride/pf.c
Next file: linux/drivers/block/ps2esdi.c
Previous file: linux/drivers/block/paride/pd.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Sat May 15 23:43:04 1999
- Orig file:
v2.3.2/linux/drivers/block/paride/pf.c
- Orig date:
Wed Nov 4 10:04:43 1998
diff -u --recursive --new-file v2.3.2/linux/drivers/block/paride/pf.c linux/drivers/block/paride/pf.c
@@ -205,6 +205,7 @@
#define DEVICE_OFF(device)
#include <linux/blk.h>
+#include <linux/blkpg.h>
#include "pseudo.h"
@@ -433,31 +434,18 @@
}
put_user(0,(long *)&geo->start);
return 0;
- case BLKRASET:
- if(!capable(CAP_SYS_ADMIN)) return -EACCES;
- if(!(inode->i_rdev)) return -EINVAL;
- if(arg > 0xff) return -EINVAL;
- read_ahead[MAJOR(inode->i_rdev)] = arg;
- return 0;
- case BLKRAGET:
- if (!arg) return -EINVAL;
- err = verify_area(VERIFY_WRITE,(long *) arg,sizeof(long));
- if (err) return (err);
- put_user(read_ahead[MAJOR(inode->i_rdev)],(long *) arg);
- return (0);
case BLKGETSIZE:
if (!arg) return -EINVAL;
err = verify_area(VERIFY_WRITE,(long *) arg,sizeof(long));
if (err) return (err);
put_user(PF.capacity,(long *) arg);
return (0);
- case BLKFLSBUF:
- if(!capable(CAP_SYS_ADMIN)) return -EACCES;
- if(!(inode->i_rdev)) return -EINVAL;
- fsync_dev(inode->i_rdev);
- invalidate_buffers(inode->i_rdev);
- return 0;
- RO_IOCTLS(inode->i_rdev,arg);
+ case BLKROSET:
+ case BLKROGET:
+ case BLKRASET:
+ case BLKRAGET:
+ case BLKFLSBUF:
+ return blk_ioctl(inode->i_rdev, cmd, arg);
default:
return -EINVAL;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)