Re: [libvirt] iSCSI Multi-IQN (Libvirt Support)

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

 



On 10/22/2009 01:50 PM, Shyam_Iyer@xxxxxxxx wrote:

<snip>

> diff --git a/src/storage_backend_iscsi.c b/src/storage_backend_iscsi.c
> index b516add..3f2a79d 100644
> --- a/src/storage_backend_iscsi.c
> +++ b/src/storage_backend_iscsi.c
> @@ -39,6 +39,10 @@
>  #include "storage_backend_iscsi.h"
>  #include "util.h"
>  #include "memory.h"
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <fcntl.h>
> +#include <unistd.h>
> 
>  #define VIR_FROM_THIS VIR_FROM_STORAGE
> 
> @@ -159,13 +163,57 @@ virStorageBackendISCSIConnection(virConnectPtr
> conn,
>                                   const char *portal,
>                                   const char *action)
>  {
> -    const char *const cmdargv[] = {
> -        ISCSIADM, "--mode", "node", "--portal", portal,
> -        "--targetname", pool->def->source.devices[0].path, action, NULL
> -    };
> -
> -    if (virRun(conn, cmdargv, NULL) < 0)
> -        return -1;
> +    DIR *dir;
> +    struct dirent *entry;
> +
> +
> +       if (pool->def->source.initiator[0].iqnname != NULL) {

You are using 8 space indentation here which does not match the libvirt
convention of 4 spaces, please fix that. Also, be sure both 'make check'
and 'make syntax-check' pass with the patch applied.

> +               int i = 0;
> +               while(pool->def->source.initiator[i].iqnname != NULL){
> +                       if (!(dir = opendir(IFACES_DIR))) {
> +                               if (errno == ENOENT)
> +                               return 0;
> +                               virReportSystemError(conn, errno,
> _("Failed to open dir '%s'"),
> +                               IFACES_DIR);
> +                               return -1;
> +                       }

Looks like the patch was mangled. Just pasting the patch into your
client probably won't be sufficient. I'd recommend git format-patch and
git send-email, or just attach the patch file.

Thanks,
Cole

--
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]