[PATCH] SCSI: Don't be so verbose if no disc is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Running a simple "touch /dev/scd0" on a SCSI cdrom will cause the following message to appear in the logs if no disc is present:

	Device not ready. Make sure there is a disc in the drive.

This results in the logs being flooded for some users by those userspace agents which repeatedly poll the device for media change.

This patch demotes the message to a quieter scsi-logging message only.

Signed-off-by: Daniel Drake <dsd@xxxxxxxxxx>

--- linux/drivers/scsi/scsi_ioctl.c.orig	2005-09-09 23:10:07.000000000 +0100
+++ linux/drivers/scsi/scsi_ioctl.c	2005-09-09 23:13:17.000000000 +0100
@@ -118,8 +118,9 @@ static int ioctl_internal_command(struct
 			break;
 		case NOT_READY:	/* This happens if there is no disc in drive */
 			if (sdev->removable && (cmd[0] != TEST_UNIT_READY)) {
-				printk(KERN_INFO "Device not ready. Make sure"
-				       " there is a disc in the drive.\n");
+				SCSI_LOG_IOCTL(2, printk(
+				       "Device not ready. Make sure"
+				       " there is a disc in the drive.\n"));
 				break;
 			}
 		case UNIT_ATTENTION:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux