On Sun, Jan 11, 2004 at 04:46:45PM -0800, Matthew Dharm wrote:
> This patch adds a sysfs attribute to the usb-storage SCSI devices.  This
> attribute (read-only) is basically a clone of the information available in
> /proc/scsi/scsi -- since that interface is going away, adding a new sysfs
> attribute seemed like a good idea.
> 
> Greg, please apply.

Oops, I never should have applied this.

I've now applied this patch and will be sending it to Linus.  Remember,
sysfs is 1 value per file.  No multivalue file crud now...

thanks,

greg k-h

# USB storage: remove info sysfs file as it violates the sysfs 1 value per file rule.

diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c    Fri Jan 23 14:50:46 2004
+++ b/drivers/usb/storage/scsiglue.c    Fri Jan 23 14:50:46 2004
@@ -309,44 +309,6 @@
  * Sysfs interface
  ***********************************************************************/
 
-/* Output routine for the sysfs info file */
-static ssize_t show_info(struct device *dev, char *buffer)
-{
-       char *pos = buffer;
-       const int length = PAGE_SIZE;
-
-       struct scsi_device *sdev = to_scsi_device(dev);
-       struct us_data *us = (struct us_data*)sdev->host->hostdata[0];
-
-       /* print the controller name */
-       SPRINTF("   Host scsi%d: usb-storage\n", sdev->host->host_no);
-
-       /* print product, vendor, and serial number strings */
-       SPRINTF("       Vendor: %s\n", us->vendor);
-       SPRINTF("      Product: %s\n", us->product);
-       SPRINTF("Serial Number: %s\n", us->serial);
-
-       /* show the protocol and transport */
-       SPRINTF("     Protocol: %s\n", us->protocol_name);
-       SPRINTF("    Transport: %s\n", us->transport_name);
-
-       /* show the device flags */
-       if (pos < buffer + length) {
-               pos += sprintf(pos, "       Quirks:");
-
-               DO_FLAG(SINGLE_LUN);
-               DO_FLAG(SCM_MULT_TARG);
-               DO_FLAG(FIX_INQUIRY);
-               DO_FLAG(FIX_CAPACITY);
-
-               *(pos++) = '\n';
-       }
-
-       return (pos - buffer);
-}
-
-static DEVICE_ATTR(info, S_IRUGO, show_info, NULL);
-
 /* Output routine for the sysfs max_sectors file */
 static ssize_t show_max_sectors(struct device *dev, char *buf)
 {
@@ -373,7 +335,6 @@
                store_max_sectors);
 
 static struct device_attribute *sysfs_device_attr_list[] = {
-               &dev_attr_info,
                &dev_attr_max_sectors,
                NULL,
                };


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to