* Re: [PATCH] xen-scsifront: correct return value checks on xenbus_scanf()
[not found] <577E288D02000078000FBF10@suse.com>
@ 2016-07-07 12:34 ` Juergen Gross
2016-07-07 12:34 ` Juergen Gross
1 sibling, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2016-07-07 12:34 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, linux-scsi
On 07/07/16 10:01, Jan Beulich wrote:
> Only a positive return value indicates success.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Juergen Gross <jgross@suse.com>
> ---
> drivers/scsi/xen-scsifront.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- 4.7-rc6-xenbus_scanf.orig/drivers/scsi/xen-scsifront.c
> +++ 4.7-rc6-xenbus_scanf/drivers/scsi/xen-scsifront.c
> @@ -1000,14 +1000,14 @@ static void scsifront_do_lun_hotplug(str
> snprintf(str, sizeof(str), "vscsi-devs/%s/state", dir[i]);
> err = xenbus_scanf(XBT_NIL, dev->otherend, str, "%u",
> &device_state);
> - if (XENBUS_EXIST_ERR(err))
> + if (err <= 0)
> continue;
>
> /* virtual SCSI device */
> snprintf(str, sizeof(str), "vscsi-devs/%s/v-dev", dir[i]);
> err = xenbus_scanf(XBT_NIL, dev->otherend, str,
> "%u:%u:%u:%u", &hst, &chn, &tgt, &lun);
> - if (XENBUS_EXIST_ERR(err))
> + if (err != 4)
> continue;
>
> /*
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen-scsifront: correct return value checks on xenbus_scanf()
[not found] <577E288D02000078000FBF10@suse.com>
2016-07-07 12:34 ` [PATCH] xen-scsifront: correct return value checks on xenbus_scanf() Juergen Gross
@ 2016-07-07 12:34 ` Juergen Gross
1 sibling, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2016-07-07 12:34 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, linux-scsi
On 07/07/16 10:01, Jan Beulich wrote:
> Only a positive return value indicates success.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Juergen Gross <jgross@suse.com>
> ---
> drivers/scsi/xen-scsifront.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- 4.7-rc6-xenbus_scanf.orig/drivers/scsi/xen-scsifront.c
> +++ 4.7-rc6-xenbus_scanf/drivers/scsi/xen-scsifront.c
> @@ -1000,14 +1000,14 @@ static void scsifront_do_lun_hotplug(str
> snprintf(str, sizeof(str), "vscsi-devs/%s/state", dir[i]);
> err = xenbus_scanf(XBT_NIL, dev->otherend, str, "%u",
> &device_state);
> - if (XENBUS_EXIST_ERR(err))
> + if (err <= 0)
> continue;
>
> /* virtual SCSI device */
> snprintf(str, sizeof(str), "vscsi-devs/%s/v-dev", dir[i]);
> err = xenbus_scanf(XBT_NIL, dev->otherend, str,
> "%u:%u:%u:%u", &hst, &chn, &tgt, &lun);
> - if (XENBUS_EXIST_ERR(err))
> + if (err != 4)
> continue;
>
> /*
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] xen-scsifront: correct return value checks on xenbus_scanf()
@ 2016-07-07 8:01 Jan Beulich
0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2016-07-07 8:01 UTC (permalink / raw)
To: Juergen Gross; +Cc: xen-devel, linux-scsi
Only a positive return value indicates success.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
drivers/scsi/xen-scsifront.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 4.7-rc6-xenbus_scanf.orig/drivers/scsi/xen-scsifront.c
+++ 4.7-rc6-xenbus_scanf/drivers/scsi/xen-scsifront.c
@@ -1000,14 +1000,14 @@ static void scsifront_do_lun_hotplug(str
snprintf(str, sizeof(str), "vscsi-devs/%s/state", dir[i]);
err = xenbus_scanf(XBT_NIL, dev->otherend, str, "%u",
&device_state);
- if (XENBUS_EXIST_ERR(err))
+ if (err <= 0)
continue;
/* virtual SCSI device */
snprintf(str, sizeof(str), "vscsi-devs/%s/v-dev", dir[i]);
err = xenbus_scanf(XBT_NIL, dev->otherend, str,
"%u:%u:%u:%u", &hst, &chn, &tgt, &lun);
- if (XENBUS_EXIST_ERR(err))
+ if (err != 4)
continue;
/*
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] xen-scsifront: correct return value checks on xenbus_scanf()
@ 2016-07-07 8:01 Jan Beulich
0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2016-07-07 8:01 UTC (permalink / raw)
To: Juergen Gross; +Cc: xen-devel, linux-scsi
Only a positive return value indicates success.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
drivers/scsi/xen-scsifront.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 4.7-rc6-xenbus_scanf.orig/drivers/scsi/xen-scsifront.c
+++ 4.7-rc6-xenbus_scanf/drivers/scsi/xen-scsifront.c
@@ -1000,14 +1000,14 @@ static void scsifront_do_lun_hotplug(str
snprintf(str, sizeof(str), "vscsi-devs/%s/state", dir[i]);
err = xenbus_scanf(XBT_NIL, dev->otherend, str, "%u",
&device_state);
- if (XENBUS_EXIST_ERR(err))
+ if (err <= 0)
continue;
/* virtual SCSI device */
snprintf(str, sizeof(str), "vscsi-devs/%s/v-dev", dir[i]);
err = xenbus_scanf(XBT_NIL, dev->otherend, str,
"%u:%u:%u:%u", &hst, &chn, &tgt, &lun);
- if (XENBUS_EXIST_ERR(err))
+ if (err != 4)
continue;
/*
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-07 12:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <577E288D02000078000FBF10@suse.com>
2016-07-07 12:34 ` [PATCH] xen-scsifront: correct return value checks on xenbus_scanf() Juergen Gross
2016-07-07 12:34 ` Juergen Gross
2016-07-07 8:01 Jan Beulich
-- strict thread matches above, loose matches on Subject: below --
2016-07-07 8:01 Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.