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

Re: [PATCH v2] NetBSD: use system-provided headers


  • To: Manuel Bouyer <bouyer@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 28 Jan 2021 12:21:33 +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=4qZ7XlxTTfBAAKWoFY7Z0AqoG2s4SSfuLf0qdSXLJzM=; b=JFGAKAnUE20Kry17c5CUNHr/L0cNDkYGVgIsk3Mq4ETiAPeJgHaXUWhFXbKVME4Ax08ghtLYKilxZK9U3Vi7tEZTzXdkRNugjx3LUjOddTMHrwrCGHeMNSsjmpgEDWAiVn0hBoIRMcv+QVvF/Jeexiwr3JfMKdeI1i9Jl8QBRCyYz62kimgf49IG5QHxYiuJftPBsMW5jqhF/E6thzPMP1AC+kUKZpyvm6YWz1y2CfZslxqZuo1wx+Wj4H+f62fG2qON5l7Fj/AKQdHlTk3gc9y4YcEnAlhY7SGfSO8HIWkuo8tjgyqmqQIcQAYCy1Z3+viHbDw0LVNmpcfEYvIybA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XkVuE/3jDLO79XyDwGwjo9qEtLf+dbtdUmPtWWxSP2VyeZZHmWCYQcIVr6UdvmttrMDVmZ6jrCZBONWfWqtqwBYyw0Bocs97Mm7qBZoIYtpAolv5QoaltbKsHvHDm1TQpqb9rc3nwX3QSwcBHd4rjD4pXGXPHj1v/E1kVFbf19469vLONzR/W+9lYQgKCHraTPWsSLK8AJyKNSfuFFFZuse6Xb2Eqx/ejCBB+g+1ymiPkyTsbLt37EXpuKU/JC6r2JlrJK5qeKgy7beD4k5HR2tXr02iviDPvkH96Q3Ma7kbKUsdZXjZUBgK3NOgpVR/MS1FJaBDqLecDETMDwapiQ==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 28 Jan 2021 11:21:51 +0000
  • Ironport-sdr: 15OThC7UWzXK2Uh0C1QfinBBEtxrOlWoydcMbff43Mq3UHGAuwurizEPudP3AX22py1ll5RdXp KzwTB0IV4RsZAFhScavO2Kc51GrHjkQzwOu+bS/mBr2EdGIvDkve6JZzFpDvOnobPDbZMoJQx8 C+pGJaIfh2JU1qTgCtpm0/hUbXil+hTSFitsgiEFGlK68N9BYeBSbKwFk8UNVWJ2VScdsHIUJm 365u4ZtDO6lRijBzgcR43caXpGTvitufW1R6sUAZKeCc+rQ2OR3oRGxDS/1vHkjpQVYMchHBVI CwI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jan 26, 2021 at 11:47:50PM +0100, Manuel Bouyer wrote:
> On NetBSD use the system-provided headers for ioctl and related definitions,
> they are up to date and have more chances to match the kernel's idea of
> the ioctls and structures.
> Remove now-unused NetBSD/evtchn.h and NetBSD/privcmd.h.
> Don't fail install if xen/sys/*.h are not present.
> 
> Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx>
> ---
>  tools/debugger/gdbsx/xg/xg_main.c      |   4 +
>  tools/include/Makefile                 |   2 +
>  tools/include/xen-sys/NetBSD/evtchn.h  |  86 --------------------
>  tools/include/xen-sys/NetBSD/privcmd.h | 106 -------------------------
>  tools/libs/call/private.h              |   4 +
>  tools/libs/ctrl/xc_private.h           |   4 +
>  tools/libs/foreignmemory/private.h     |   6 ++
>  7 files changed, 20 insertions(+), 192 deletions(-)
>  delete mode 100644 tools/include/xen-sys/NetBSD/evtchn.h
>  delete mode 100644 tools/include/xen-sys/NetBSD/privcmd.h
> 
> diff --git a/tools/debugger/gdbsx/xg/xg_main.c 
> b/tools/debugger/gdbsx/xg/xg_main.c
> index 4576c762af..903d60baed 100644
> --- a/tools/debugger/gdbsx/xg/xg_main.c
> +++ b/tools/debugger/gdbsx/xg/xg_main.c
> @@ -49,7 +49,11 @@
>  #include "xg_public.h"
>  #include <xen/version.h>
>  #include <xen/domctl.h>
> +#ifdef __NetBSD__
> +#include <xen/xenio.h>
> +#else
>  #include <xen/sys/privcmd.h>
> +#endif
>  #include <xen/foreign/x86_32.h>
>  #include <xen/foreign/x86_64.h>
>  
> diff --git a/tools/include/Makefile b/tools/include/Makefile
> index 4d4ec5f974..04902397b7 100644
> --- a/tools/include/Makefile
> +++ b/tools/include/Makefile
> @@ -68,7 +68,9 @@ install: all
>       $(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(includedir)/xen/foreign
>       $(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(includedir)/xen/hvm
>       $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(includedir)/xen/io
> +ifeq ($(wildcard xen/sys/.),)

Maybe I'm confused, but doesn't this need to be ifneq? So that if
wildcard returns any output the command is executed?

I would also use $(wildcard xen/sys/*.h) because that matches exactly
the pattern used below.

Thanks, Roger.



 


Rackspace

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