From 17eaaceef52b1ce5ca061d49a1ff9ae56ccce1e1 Mon Sep 17 00:00:00 2001 From: "Salyzyn, Mark" Date: Tue, 8 Jan 2008 12:23:49 -0800 Subject: [SCSI] aacraid: add sysfs report of RAID level Report the RAID level string for the SCSI device representing the array. Report is in /sys/class/scsi_device/#:#:#:#/device/level. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley --- drivers/scsi/aacraid/aachba.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/aacraid/aachba.c') diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 43d6aff460d..eee65c145cb 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -690,7 +690,12 @@ static char *container_types[] = { "Unknown" }; - +char * get_container_type(unsigned tindex) +{ + if (tindex >= ARRAY_SIZE(container_types)) + tindex = ARRAY_SIZE(container_types) - 1; + return container_types[tindex]; +} /* Function: setinqstr * -- cgit v1.2.3-70-g09d2