summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShampavman <shampavman.cg@gmail.com>2011-11-29 10:32:13 +0530
committerShampavman <shampavman.cg@gmail.com>2011-11-29 10:32:13 +0530
commit9fc69cd99026dc35cc62ad524193fa0dfd4de20f (patch)
treed826f1369a6ccd8077b3ebe2e5379638cf731a9e
parent5aad09c6a20d7d345acf53c0f6d7c24e8bb63090 (diff)
downloadillumos-joyent-9fc69cd99026dc35cc62ad524193fa0dfd4de20f.tar.gz
732 iSCSI IQNs should use org.illumos instead of com.sun
Reviewed by: Garrett D'Amore <garrett@nexenta.com> Reviewed by: Richard Elling <richard.elling@richardelling.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/lib/libiscsit/common/libiscsit.c7
-rw-r--r--usr/src/lib/libiscsit/common/libiscsit.h10
2 files changed, 15 insertions, 2 deletions
diff --git a/usr/src/lib/libiscsit/common/libiscsit.c b/usr/src/lib/libiscsit/common/libiscsit.c
index 9530419701..c45b9b1c1d 100644
--- a/usr/src/lib/libiscsit/common/libiscsit.c
+++ b/usr/src/lib/libiscsit/common/libiscsit.c
@@ -21,6 +21,9 @@
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
*/
+/*
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ */
#include <sys/types.h>
#include <sys/stat.h>
@@ -1846,10 +1849,10 @@ it_iqn_generate(char *iqn_buf, int iqn_buf_len, char *opt_iqn_suffix)
uuid_unparse(id, id_str);
if (opt_iqn_suffix) {
- ret = snprintf(iqn_buf, iqn_buf_len, "iqn.1986-03.com.sun:"
+ ret = snprintf(iqn_buf, iqn_buf_len, DEFAULT_IQN
"%02d:%s.%s", TARGET_NAME_VERS, id_str, opt_iqn_suffix);
} else {
- ret = snprintf(iqn_buf, iqn_buf_len, "iqn.1986-03.com.sun:"
+ ret = snprintf(iqn_buf, iqn_buf_len, DEFAULT_IQN
"%02d:%s", TARGET_NAME_VERS, id_str);
}
diff --git a/usr/src/lib/libiscsit/common/libiscsit.h b/usr/src/lib/libiscsit/common/libiscsit.h
index 861529e86f..704c790edc 100644
--- a/usr/src/lib/libiscsit/common/libiscsit.h
+++ b/usr/src/lib/libiscsit/common/libiscsit.h
@@ -22,6 +22,9 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ */
#ifndef _LIBISCSIT_H
#define _LIBISCSIT_H
@@ -45,6 +48,13 @@ extern "C" {
#define IS_EUI_NAME(s) (strncmp((s), "eui.", 4) == 0)
/*
+ * We change the default IQN here to org.illumos.
+ * Other distros using it need to change accordingly.
+ */
+
+#define DEFAULT_IQN "iqn.2010-08.org.illumos:"
+
+/*
* Object Hierarchy
*
* _______________________