Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/iscsi/dist/src/initiator Remove hostname from p...
details: https://anonhg.NetBSD.org/src/rev/8f553d839381
branches: trunk
changeset: 762479:8f553d839381
user: sborrill <sborrill%NetBSD.org@localhost>
date: Mon Feb 21 17:24:19 2011 +0000
description:
Remove hostname from pathname to storage in mount point.
This means /mnt/mytarget.domain.local/target0/storage is now
/mnt/target0/storage.
Rationale is as follows:
- The hostname used may vary (i.e. name vs FQDN vs IP) which can mess up
mountpoints (especially across multiple hosts e.g. in a shared xen pool)
- Target name is given in the mount anyway so it is redundant
OK agc@
diffstat:
external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 | 6 ++--
external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c | 25 ++++++----------
2 files changed, 13 insertions(+), 18 deletions(-)
diffs (77 lines):
diff -r 66381c003958 -r 8f553d839381 external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8
--- a/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Mon Feb 21 17:05:50 2011 +0000
+++ b/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.8 Mon Feb 21 17:24:19 2011 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: iscsi-initiator.8,v 1.3 2010/08/03 10:24:39 sborrill Exp $
+.\" $NetBSD: iscsi-initiator.8,v 1.4 2011/02/21 17:24:19 sborrill Exp $
.\"
.\" Copyright © 2007 Alistair Crooks. All rights reserved.
.\"
@@ -26,7 +26,7 @@
.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 3, 2010
+.Dd February 21, 2011
.Dt ISCSI-INITIATOR 8
.Os
.Sh NAME
@@ -120,7 +120,7 @@
.Sh EXAMPLES
.Bd -literal
# ./iscsi-initiator -u agc -h iscsi-target0.alistaircrooks.co.uk /mnt
-# ls -al /mnt/iscsi-target0.alistaircrooks.co.uk/target0
+# ls -al /mnt/target0
total 576
drwxr-xr-x 2 agc agc 512 May 11 22:24 .
drwxr-xr-x 2 agc agc 512 May 11 22:24 ..
diff -r 66381c003958 -r 8f553d839381 external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c
--- a/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c Mon Feb 21 17:05:50 2011 +0000
+++ b/external/bsd/iscsi/dist/src/initiator/iscsi-initiator.c Mon Feb 21 17:24:19 2011 +0000
@@ -718,36 +718,31 @@
tv.v[tv.c].serial = strdup((char *)&data[4]);
/* create the tree using virtdir routines */
- cc = snprintf(name, sizeof(name), "/%s/%s", host, colon);
+ cc = snprintf(name, sizeof(name), "/%s", colon);
virtdir_add(&iscsi, name, cc, 'd', name, cc);
- cc = snprintf(name, sizeof(name), "/%s/%s/storage", host,
- colon);
+ cc = snprintf(name, sizeof(name), "/%s/storage", colon);
virtdir_add(&iscsi, name, cc, devtype, (void *)&sti,
sizeof(sti));
- cc = snprintf(name, sizeof(name), "/%s/%s/hostname", host,
- colon);
+ cc = snprintf(name, sizeof(name), "/%s/hostname", colon);
virtdir_add(&iscsi, name, cc, 'l', tinfo.name,
strlen(tinfo.name));
- cc = snprintf(name, sizeof(name), "/%s/%s/ip", host, colon);
+ cc = snprintf(name, sizeof(name), "/%s/ip", colon);
virtdir_add(&iscsi, name, cc, 'l', tinfo.ip, strlen(tinfo.ip));
- cc = snprintf(name, sizeof(name), "/%s/%s/targetname", host,
- colon);
+ cc = snprintf(name, sizeof(name), "/%s/targetname", colon);
virtdir_add(&iscsi, name, cc, 'l', tinfo.TargetName,
strlen(tinfo.TargetName));
- cc = snprintf(name, sizeof(name), "/%s/%s/vendor", host, colon);
+ cc = snprintf(name, sizeof(name), "/%s/vendor", colon);
virtdir_add(&iscsi, name, cc, 'l', tv.v[tv.c].vendor,
strlen(tv.v[tv.c].vendor));
- cc = snprintf(name, sizeof(name), "/%s/%s/product", host,
- colon);
+ cc = snprintf(name, sizeof(name), "/%s/product", colon);
virtdir_add(&iscsi, name, cc, 'l', tv.v[tv.c].product,
strlen(tv.v[tv.c].product));
- cc = snprintf(name, sizeof(name), "/%s/%s/version", host,
- colon);
+ cc = snprintf(name, sizeof(name), "/%s/version", colon);
virtdir_add(&iscsi, name, cc, 'l', tv.v[tv.c].version,
strlen(tv.v[tv.c].version));
if (tv.v[tv.c].serial[0] && tv.v[tv.c].serial[0] != ' ') {
- cc = snprintf(name, sizeof(name), "/%s/%s/serial",
- host, colon);
+ cc = snprintf(name, sizeof(name), "/%s/serial",
+ colon);
virtdir_add(&iscsi, name, cc, 'l', tv.v[tv.c].serial,
strlen(tv.v[tv.c].serial));
}
Home |
Main Index |
Thread Index |
Old Index