From ef3b6fe9111c074db957321e654495a8044b6ca0 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Tue, 30 Oct 2012 12:02:09 +0100 Subject: [PATCH] INIT fix url parsing error message --- lib/init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/init.c b/lib/init.c index dedcc42..b80456c 100644 --- a/lib/init.c +++ b/lib/init.c @@ -312,10 +312,12 @@ iscsi_parse_url(struct iscsi_context *iscsi, const char *url, int full) int l; if (strncmp(url, "iscsi://", 8)) { + if (full) { iscsi_set_error(iscsi, "Invalid URL %s\niSCSI URL must be of " - "the form: %s", - url, - ISCSI_URL_SYNTAX); + "the form: %s",url,ISCSI_URL_SYNTAX); } + else { + iscsi_set_error(iscsi, "Invalid URL %s\niSCSI Portal URL must be of " + "the form: %s",url,ISCSI_PORTAL_URL_SYNTAX); } return NULL; }