提交 9a7af289 编写于 作者: H Horst Hummel 提交者: Linus Torvalds

[PATCH] s390: BIODASDPRRD ioctl return code

The IOCTL BIODASDPRRD had no return code for 'profiling is inactive' and
therefore tunedasd wrote misleading message for request-counter = 0.
Introduce return-code EIO for inactive profiling.
Signed-off-by: NHorst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 cfb1b555
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Bugreports.to..: <Linux390@de.ibm.com> * Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
* *
* $Revision: 1.47 $ * $Revision: 1.50 $
* *
* i/o controls for the dasd driver. * i/o controls for the dasd driver.
*/ */
...@@ -352,6 +352,9 @@ dasd_ioctl_read_profile(struct block_device *bdev, int no, long args) ...@@ -352,6 +352,9 @@ dasd_ioctl_read_profile(struct block_device *bdev, int no, long args)
if (device == NULL) if (device == NULL)
return -ENODEV; return -ENODEV;
if (dasd_profile_level == DASD_PROFILE_OFF)
return -EIO;
if (copy_to_user((long __user *) args, (long *) &device->profile, if (copy_to_user((long __user *) args, (long *) &device->profile,
sizeof (struct dasd_profile_info_t))) sizeof (struct dasd_profile_info_t)))
return -EFAULT; return -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册