Re: [PATCH 06/12] qemu: block: Add JSON props generator for iSCSI protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 03, 2017 at 03:29:23PM +0100, Peter Krempa wrote:
From: John Ferlan <jferlan@xxxxxxxxxx>

---
+static virJSONValuePtr
+qemuBlockStorageSourceGetISCSIProps(virStorageSourcePtr src)
+{

[...]

+    if (VIR_STRDUP(target, src->path) < 0)
+        goto cleanup;
+
+    /* Separate the target and lun */
+    if ((lunStr = strchr(target, '/'))) {
+        *(lunStr++) = '\0';
+        if (virStrToLong_ui(lunStr, NULL, 10, &lun) < 0) {
+            virReportError(VIR_ERR_INTERNAL_ERROR,
+                           _("cannot parse target for lunStr '%s'"),
+                           target);
+            goto cleanup;
+        }
+    }
+
+    /* combine host and port into portal */
+    if (virAsprintf(&portal, "%s:%u", src->hosts[0].name, src->hosts[0].port) < 0)
+        goto cleanup;

Can src->hosts[0].name possibly be a literal IPv6 address?

Jan

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux