[dm-devel] [PATCH v2 07/20] libmultipath: get_vpd_sgio: support VPD 0xc9
Martin Wilck
mwilck at suse.com
Sat Jan 13 21:19:25 UTC 2018
This VPD is needed to check for NetApp E-Series RDAC support.
---
libmultipath/discovery.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 43631c46f21e..8ae170ee3a27 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1118,7 +1118,11 @@ get_vpd_sgio (int fd, int pg, char * str, int maxlen)
len = parse_vpd_pg80(buff, str, maxlen);
else if (pg == 0x83)
len = parse_vpd_pg83(buff, buff_len, str, maxlen);
- else
+ else if (pg == 0xc9 && maxlen >= 8) {
+ len = buff_len < 8 ? -ENODATA :
+ (buff_len <= maxlen ? buff_len : maxlen);
+ memcpy (str, buff, len);
+ } else
len = -ENOSYS;
return len;
--
2.15.1
More information about the dm-devel
mailing list