From: Nao Nishijima Date: Thu, 25 Aug 2011 09:04:06 +0000 (+0900) Subject: [SCSI] genhd: add a new attribute "alias" in gendisk X-Git-Tag: v3.2-rc1~125^2~119 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a72c5e5eb738033938ab30d6a634b74d1d060f10;p=pandora-kernel.git [SCSI] genhd: add a new attribute "alias" in gendisk This patch allows the user to set an "alias" of the disk via sysfs interface. This patch only adds a new attribute "alias" in gendisk structure. To show the alias instead of the device name in kernel messages, we need to revise printk messages and use alias_name() in them. Example: (current) printk("disk name is %s\n", disk->disk_name); (new) printk("disk name is %s\n", alias_name(disk)); Users can use alphabets, numbers, '-' and '_' in "alias" attribute. A disk can have an "alias" which length is up to 255 bytes. This attribute is write-once. Suggested-by: James Bottomley Suggested-by: Jon Masters Signed-off-by: Nao Nishijima Signed-off-by: James Bottomley --- Reading git-diff-tree failed