Yangkook Kim wrote:
> This patch adds some codes to output logs to reflect the return value
> of iscsid_req_wait() for outputting logging.
> 

Thanks for the patch!

It looks like you used the git tree. What branch did you use? I am 
asking because I could not find the code below.


>         int nsec;
> @@ -231,7 +259,18 @@
>         err = iscsid_req_by_rec_async(cmd, rec, &fd);
>         if (err)
>                 return err;
> -       return iscsid_req_wait(cmd, fd);
> +       err = iscsid_req_wait(cmd, fd);
> +       if (err) {
> +               log_error("Could not login to [iface: %s, target: %s, "
> +                         "portal: %s,%d]: ", rec->iface.name,
> +                          rec->name, rec->conn[0].address,
> +                          rec->conn[0].port);
> +       } else
> +       printf("Login to [iface: %s, target: %s, portal: "
> +              "%s,%d]: successful\n", rec->iface.name,
> +               rec->name, rec->conn[0].address,
> +               rec->conn[0].port);
> +               return err;
>  }
> 
>  int iscsid_req_by_sid_async(iscsiadm_cmd_e cmd, int sid, int *fd)
> @@ -312,34 +351,6 @@
>         iface_setup_defaults(&rec->iface);
>  }
> 
> -void iscsid_handle_error(mgmt_ipc_err_e err)
> -{
> -       static char *err_msgs[] = {
> -               /* 0 */ "",
> -               /* 1 */ "unknown error",
> -               /* 2 */ "not found",
> -               /* 3 */ "no available memory",
> -               /* 4 */ "encountered connection failure",
> -               /* 5 */ "encountered iSCSI login failure",
> -               /* 6 */ "encountered iSCSI database failure",
> -               /* 7 */ "invalid parameter",
> -               /* 8 */ "connection timed out",
> -               /* 9 */ "internal error",
> -               /* 10 */ "encountered iSCSI logout failure",
> -               /* 11 */ "iSCSI PDU timed out",
> -               /* 12 */ "iSCSI driver not found. Please make sure it
> is loaded, and retry the operation",
> -               /* 13 */ "daemon access denied",
> -               /* 14 */ "iSCSI driver does not support requested 
> capability.",
> -               /* 15 */ "already exists",
> -               /* 16 */ "Unknown request",
> -               /* 17 */ "encountered iSNS failure",
> -               /* 18 */ "could not communicate to iscsid",
> -               /* 19 */ "encountered non-retryable iSCSI login failure",
> -               /* 20 */ "could not connect to iscsid",
> -       };
> -       log_error("initiator reported error (%d - %s)", err, err_msgs[err]);
> -}
> -
>  int __iscsi_match_session(node_rec_t *rec, char *targetname,
>                           char *address, int port, struct iface_rec *iface)
>  {
> 
> > 
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to