Re: [SCSI] scsi.h: add macro for enclosure bit of inquiry data

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

 



James Bottomley wrote:
> The macro tells us whether the device is (or contains) an enclosure device.
...
> +static inline int scsi_device_enclosure(struct scsi_device *sdev)
> +{
> +	return sdev->inquiry[6] & (1<<6);
> +}

Perhaps call it scsi_device_is_enclosure() to better reflect the nature
of this function.

Or if it is an accessor to inquiry data to you, maybe call it
scsi_device_inquiry_encserv() or
scsi_device_inquiry_enclosure_services() or
sdev_to_inquiry_encserv() or
sdev_to_inquiry_enclosure_services().

Alas neither of this fits with the existing similar functions in
scsi_device.h which don't have expressive names.
-- 
Stefan Richter
-=====-==--- ---= =-=--
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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