aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2016-12-21 09:49:16 +0000
committerAlexander Motin <mav@FreeBSD.org>2016-12-21 09:49:16 +0000
commit3157c3688675c32daad3b7f4789b6a73083dbc68 (patch)
tree1d833573292e12f822fd8293fe2ed52135814b91 /sys/cam
parent00d72d57148f83d80a18e63bab7cd6d0f7889875 (diff)
Notes
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_xpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 2b097a939b8f..f8bde15c1ae5 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -1191,10 +1191,10 @@ xpt_getattr(char *buf, size_t len, const char *attr, struct cam_path *path)
&& idd->identifier[0] == 0x10) {
if ((idd->length - 2) * 2 + 4 < len) {
for (l = 2, o = 0; l < idd->length; l++) {
+ if (l == 6 || l == 8 || l == 10 || l == 12)
+ o += sprintf(buf + o, "-");
o += sprintf(buf + o, "%02x",
idd->identifier[l]);
- if (l == 4 || l == 6 || l == 8 || l == 10)
- o += sprintf(buf + o, "-");
}
} else
ret = EFAULT;