[PATCH] virNetDevOpenvswitchGetVhostuserIfname: Remove a single '\n' from ifname

Yalei Li 274268859 at qq.com
Tue Feb 2 01:54:17 UTC 2021


Thank you.
Does this patch need other reviews ?


On 1/22/21 7:26 AM, Yalei Li wrote:
> Ovs-vsctl returns a newline result.
> Signed-off-by: Yalei Li <liyl43 at chinatelecom.cn>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413 at gmail.com>

>   src/util/virnetdevopenvswitch.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
> index f9b3369b2a..bd840bd3b7 100644
> --- a/src/util/virnetdevopenvswitch.c
> +++ b/src/util/virnetdevopenvswitch.c
> @@ -575,6 +575,7 @@ virNetDevOpenvswitchGetVhostuserIfname(const char *path,
>           return 0;
>       }
>   
> +    virStringTrimOptionalNewline(*ifname);
>       if (virNetDevOpenvswitchMaybeUnescapeReply(*ifname) < 0) {
>           VIR_FREE(*ifname);
>           return -1;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210202/cab4898d/attachment-0001.htm>


More information about the libvir-list mailing list