* [PATCH] Tools: hv: check return value of system in hv_kvp_daemon
@ 2013-08-01 13:03 Olaf Hering
2013-08-01 14:36 ` KY Srinivasan
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2013-08-01 13:03 UTC (permalink / raw)
To: kys, gregkh; +Cc: linux-kernel, Olaf Hering
hv_kvp_daemon.c: In function 'main':
hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/hv/hv_kvp_daemon.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index ba075e5..b96eccc 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -1353,7 +1353,11 @@ setval_done:
*/
snprintf(cmd, sizeof(cmd), "%s %s", "hv_set_ifconfig", if_file);
- system(cmd);
+ if (system(cmd)) {
+ syslog(LOG_ERR, "Failed to execute cmd '%s'; error: %d %s",
+ cmd, errno, strerror(errno));
+ return HV_E_FAIL;
+ }
return 0;
setval_error:
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] Tools: hv: check return value of system in hv_kvp_daemon
2013-08-01 13:03 [PATCH] Tools: hv: check return value of system in hv_kvp_daemon Olaf Hering
@ 2013-08-01 14:36 ` KY Srinivasan
2013-08-02 3:11 ` gregkh
0 siblings, 1 reply; 3+ messages in thread
From: KY Srinivasan @ 2013-08-01 14:36 UTC (permalink / raw)
To: Olaf Hering, gregkh; +Cc: linux-kernel
> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Thursday, August 01, 2013 9:04 AM
> To: KY Srinivasan; gregkh@linuxfoundation.org
> Cc: linux-kernel@vger.kernel.org; Olaf Hering
> Subject: [PATCH] Tools: hv: check return value of system in hv_kvp_daemon
>
> hv_kvp_daemon.c: In function 'main':
> hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared
> with attribute warn_unused_result [-Wunused-result]
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
> tools/hv/hv_kvp_daemon.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
> index ba075e5..b96eccc 100644
> --- a/tools/hv/hv_kvp_daemon.c
> +++ b/tools/hv/hv_kvp_daemon.c
> @@ -1353,7 +1353,11 @@ setval_done:
> */
>
> snprintf(cmd, sizeof(cmd), "%s %s", "hv_set_ifconfig", if_file);
> - system(cmd);
> + if (system(cmd)) {
> + syslog(LOG_ERR, "Failed to execute cmd '%s'; error: %d %s",
> + cmd, errno, strerror(errno));
> + return HV_E_FAIL;
> + }
> return 0;
>
> setval_error:
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Tools: hv: check return value of system in hv_kvp_daemon
2013-08-01 14:36 ` KY Srinivasan
@ 2013-08-02 3:11 ` gregkh
0 siblings, 0 replies; 3+ messages in thread
From: gregkh @ 2013-08-02 3:11 UTC (permalink / raw)
To: KY Srinivasan; +Cc: Olaf Hering, linux-kernel
On Thu, Aug 01, 2013 at 02:36:10PM +0000, KY Srinivasan wrote:
>
>
> > -----Original Message-----
> > From: Olaf Hering [mailto:olaf@aepfle.de]
> > Sent: Thursday, August 01, 2013 9:04 AM
> > To: KY Srinivasan; gregkh@linuxfoundation.org
> > Cc: linux-kernel@vger.kernel.org; Olaf Hering
> > Subject: [PATCH] Tools: hv: check return value of system in hv_kvp_daemon
> >
> > hv_kvp_daemon.c: In function 'main':
> > hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared
> > with attribute warn_unused_result [-Wunused-result]
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Can you please resend this to me, I don't seem to have a copy of it
anywhere.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-02 3:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-01 13:03 [PATCH] Tools: hv: check return value of system in hv_kvp_daemon Olaf Hering
2013-08-01 14:36 ` KY Srinivasan
2013-08-02 3:11 ` gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®