[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY2PR0301MB0711B97312C95FE4C8BD71D2A0620@BY2PR0301MB0711.namprd03.prod.outlook.com>
Date: Wed, 10 Dec 2014 18:54:20 +0000
From: KY Srinivasan <kys@...rosoft.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
CC: Haiyang Zhang <haiyangz@...rosoft.com>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dexuan Cui <decui@...rosoft.com>
Subject: RE: [PATCH 5/5] Tools: hv: do not add redundant '/' in
hv_start_fcopy()
> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@...hat.com]
> Sent: Tuesday, December 9, 2014 7:48 AM
> To: KY Srinivasan
> Cc: Haiyang Zhang; devel@...uxdriverproject.org; linux-
> kernel@...r.kernel.org; Dexuan Cui
> Subject: [PATCH 5/5] Tools: hv: do not add redundant '/' in hv_start_fcopy()
>
> We don't need to add additional '/' to smsg->path_name as
> snprintf("%s/%s") does the right thing. Without the patch we get doubled '//'
> in the log message.
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Thank you.
K. Y
> ---
> tools/hv/hv_fcopy_daemon.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
> index 1a23872..9445d8f 100644
> --- a/tools/hv/hv_fcopy_daemon.c
> +++ b/tools/hv/hv_fcopy_daemon.c
> @@ -43,12 +43,6 @@ static int hv_start_fcopy(struct hv_start_fcopy *smsg)
> int error = HV_E_FAIL;
> char *q, *p;
>
> - /*
> - * If possile append a path seperator to the path.
> - */
> - if (strlen((char *)smsg->path_name) < (W_MAX_PATH - 2))
> - strcat((char *)smsg->path_name, "/");
> -
> p = (char *)smsg->path_name;
> snprintf(target_fname, sizeof(target_fname), "%s/%s",
> (char *)smsg->path_name, (char *)smsg->file_name);
> --
> 1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists