From: Hannes Reinecke <h...@suse.de>

This patch makes the default IQN prefix for iSNS configurable
at compile-time.

It can be modified by setting
'IQNFLAGS = -DIQNPREFIX=\"iqn.YYYY-MM\"'
when calling 'make'.

Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 utils/open-isns/Makefile.in | 3 +++
 utils/open-isns/message.c   | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/utils/open-isns/Makefile.in b/utils/open-isns/Makefile.in
index cb721f2b990a..46d2723739d0 100644
--- a/utils/open-isns/Makefile.in
+++ b/utils/open-isns/Makefile.in
@@ -83,6 +83,9 @@ distclean::
        rm -f config.h Makefile config.status config.log
        rm -rf autom4te.cache
 
+message.o: message.c
+       gcc $(CFLAGS) $(CPPFLAGS) $(IQNFLAGS) -c -o $@ message.c
+
 $(LIB): $(LIBOBJS)
        ar cr $@ $(LIBOBJS)
 
diff --git a/utils/open-isns/message.c b/utils/open-isns/message.c
index 4cd40c3e4d3a..db67a2cc1e15 100644
--- a/utils/open-isns/message.c
+++ b/utils/open-isns/message.c
@@ -27,7 +27,11 @@
  * we fake it by assigning a date before the
  * dawn of time.
  */
+#ifndef IQNPREFIX
 #define DUMMY_IQN_PREFIX       "iqn.1967-12."
+#else
+#define DUMMY_IQN_PREFIX IQNPREFIX
+#endif
 
 static uint32_t                isns_xid = 1;
 
-- 
2.1.2

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to