* Christoph Hellwig <hch@xxxxxx> [2010-06-21 07:46]: > On Fri, Jun 18, 2010 at 01:38:02PM -0500, Ryan Harper wrote: > > Create a new attribute for virtio-blk devices that will fetch the serial number > > of the block device. This attribute can be used by udev to create disk/by-id > > symlinks for devices that don't have a UUID (filesystem) associated with them. > > > > ATA_IDENTIFY strings are special in that they can be up to 20 chars long > > and aren't required to be NULL-terminated. The buffer is also zero-padded > > meaning that if the serial is 19 chars or less that we get a NULL terminated > > string. When copying this value into a string buffer, we must be careful to > > copy up to the NULL (if it present) and only 20 if it is longer and not to > > attempt to NULL terminate; this isn't needed. > > Why is this virtio-blk specific? In a later mail you mention you want > to use it for udev. So please export this from scsi/libata as well and > we have one proper interface that we can use for all devices. ATA and SCSI devices are already supported via ata_id and scsi_id commands included in udev. Qemu implements the drive serial part for them and udev creates proper disk/by-id links. This patch is about filling the gap for virtio-blk devices which cannot work with ata_id and scsi_id. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@xxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html