[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gdbsx: use right path for privcmd


  • To: Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 18 Jan 2021 19:03:49 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uNRlMYdaOrMjPIU45F+XDenOJVwduBI6AM59Pjt1N8w=; b=LM/G2YaITWtLId+aoV5myK/3dYDkzDQx2YV8QO9dPSOKv0/UvJ18FE+E/wmkTUHcRBBZm6cBJloxIIJnMdrD1edCLAf/PhI9D/+E/6TJqR52ojyQ5QUSH0tEYz9JdeVYw1jmdq1vXO6L0yCMHGVo7lIRdKX6CnjswtrGVKkjOv6I5qf7MMxD750BhYOkP/d/R1LUSu0+EZ2RT52zsSXhZeoEAD+FRMy6iXIHEzGJt9jRuRckG9dAvjBx/1HgbQTGglXQimvdXqPcarOMUqMMISHzAen2GxCGrB/IUG4pMXd9ChXC7CiIbUuwNYVhNUnlz27uL/4XF7ZW8K+kF6USlg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QOYJUuPFkwKHZQl4+s96O+KhDYgIfMJc6wOI/arL3ojDbcD81fGK5UtgTE7yM99kLMzss9r5wqOM3wNtigtD3j4ltq4kJUdFKBk4nUGjw9s+mldNds+URfwOlBtkNJAd9kq2oxJCq3PnUgf/Neu9Noq2tYwjVPfYKqYR3vo9U+d7Sw9d1s0rayEOluhKcdrI8jBUbq3k2ilWqmoX7F3Z+sydzRrm8asHlnCeUIHVFtEA9XZn17nwQcht1mM1nJa6Wu/RBPgjkX9kA+pCXvvvH53fCcvOvYRjz3WSh3Yjv4DCTyg5/kGGf3+5tNLTtbP9YjdMbvkwiwidKZx7edzyiQ==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Manuel Bouyer <bouyer@xxxxxxxxxx>, Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 18 Jan 2021 18:03:58 +0000
  • Ironport-sdr: kI2Yp6nV90UWI2u77CNdD8U+VdmfGtcuN3rWvThK6Af7TQK1k7J84sLtGClYVtiUtOsnhZGDDR w1wwZsyzM86k0I9QGr9P+8vld1BqEhZChFRA+HnMSyH9O10C1X+Ad8dDQ59QkEgJkR+FWFVCVD MnDFo0NXGKzO5aw/rE/OOIS7B7T0I5c9PmwXDwwbW4aP6liQIF+SFv6l4uOrhaWxCFjvyNvIH4 k/vwUz36i9ToCk88hkVM/V6mLZ2MCIQADMxTrUVf6ri5KI7TKgqwSlhqhtVFGuiIO0HGLtmRpo Ezw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jan 12, 2021 at 07:12:28PM +0100, Manuel Bouyer wrote:
> From: Manuel Bouyer <bouyer@xxxxxxxxxx>
> 
> On NetBSD the privcmd interface node is /kern/xen/privcmd
> 
> Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx>
> ---
>  tools/debugger/gdbsx/xg/xg_main.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/debugger/gdbsx/xg/xg_main.c 
> b/tools/debugger/gdbsx/xg/xg_main.c
> index ce95648e7e..83a009c195 100644
> --- a/tools/debugger/gdbsx/xg/xg_main.c
> +++ b/tools/debugger/gdbsx/xg/xg_main.c
> @@ -130,11 +130,11 @@ xg_init()
>      int flags, saved_errno;
>  
>      XGTRC("E\n");
> -    if ((_dom0_fd=open("/dev/xen/privcmd", O_RDWR)) == -1) {
> -        if ((_dom0_fd=open("/proc/xen/privcmd", O_RDWR)) == -1) {
> -            perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd\n");
> -            return -1;
> -        }
> +    if ((_dom0_fd=open("/dev/xen/privcmd", O_RDWR)) == -1 &&
> +        (_dom0_fd=open("/proc/xen/privcmd", O_RDWR)) == -1 &&
> +     (_dom0_fd=open("/kern/xen/privcmd", O_RDWR)) == -1) {

Nit: hard tab instead of spaces.

> +        perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd or 
> /kern/xen/privcmd\n");

I would have split the line, so:

        perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd or "
               "/kern/xen/privcmd\n");

If you can resend with those fixed please add:

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.