Skip to contentSkip to conversation

s390: BIODASDPRRD ioctl return code.

PATCH In review Martin Schwidefsky 1 participant 1 message Dec 9, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/17 s390: BIODASDPRRD ioctl return code.

From: Horst Hummel <[email protected]>

[patch 4/17] 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.

---

 drivers/s390/block/dasd_ioctl.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)
drivers/s390/block/dasd_ioctl.c +4 -1
diff -urpN linux-2.6/drivers/s390/block/dasd_ioctl.c linux-2.6-patched/drivers/s390/block/dasd_ioctl.c
@@ -7,7 +7,7 @@
  * Bugreports.to..: <[email protected]>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
  *
- * $Revision: 1.47 $
+ * $Revision: 1.50 $
  *
  * i/o controls for the dasd driver.
  */
@@ -352,6 +352,9 @@ dasd_ioctl_read_profile(struct block_dev
 	if (device == NULL)
 		return -ENODEV;
 
+	if (dasd_profile_level == DASD_PROFILE_OFF)
+		return -EIO;
+
 	if (copy_to_user((long __user *) args, (long *) &device->profile,
 			 sizeof (struct dasd_profile_info_t)))
 		return -EFAULT;