qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types
@ 2013-04-25 17:59 Ed Maste
  2013-04-26 10:57 ` Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ed Maste @ 2013-04-25 17:59 UTC (permalink / raw)
  To: qemu-trivial

Originally from Garrett Cooper in FreeBSD PR ports/155558
http://www.freebsd.org/cgi/query-pr.cgi?pr=155558

Signed-off-by: Ed Maste <emaste@freebsd.org>
---
 bsd-user/syscall.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
index 18b43f1..69e3466 100644
--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -211,7 +211,11 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind)
         *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
         break;
 #endif
+#if !defined(__FreeBSD_version) || __FreeBSD_version < 900031
     case CTLTYPE_QUAD:
+#else
+    case CTLTYPE_U64:
+#endif
         *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
         break;
     case CTLTYPE_STRING:
-- 
1.7.11.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types
  2013-04-25 17:59 [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types Ed Maste
@ 2013-04-26 10:57 ` Stefan Hajnoczi
  2013-04-26 11:09 ` Stefan Hajnoczi
  2013-04-26 17:13 ` Patrick Welche
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2013-04-26 10:57 UTC (permalink / raw)
  To: Ed Maste; +Cc: qemu-trivial, qemu-devel

On Thu, Apr 25, 2013 at 01:59:41PM -0400, Ed Maste wrote:

CCing qemu-devel@nongnu.org.

> Originally from Garrett Cooper in FreeBSD PR ports/155558
> http://www.freebsd.org/cgi/query-pr.cgi?pr=155558
> 
> Signed-off-by: Ed Maste <emaste@freebsd.org>
> ---
>  bsd-user/syscall.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
> index 18b43f1..69e3466 100644
> --- a/bsd-user/syscall.c
> +++ b/bsd-user/syscall.c
> @@ -211,7 +211,11 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind)
>          *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
>          break;
>  #endif
> +#if !defined(__FreeBSD_version) || __FreeBSD_version < 900031
>      case CTLTYPE_QUAD:
> +#else
> +    case CTLTYPE_U64:
> +#endif
>          *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
>          break;
>      case CTLTYPE_STRING:
> -- 
> 1.7.11.5
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types
  2013-04-25 17:59 [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types Ed Maste
  2013-04-26 10:57 ` Stefan Hajnoczi
@ 2013-04-26 11:09 ` Stefan Hajnoczi
  2013-04-26 17:13 ` Patrick Welche
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2013-04-26 11:09 UTC (permalink / raw)
  To: Ed Maste; +Cc: qemu-trivial

On Thu, Apr 25, 2013 at 01:59:41PM -0400, Ed Maste wrote:
> Originally from Garrett Cooper in FreeBSD PR ports/155558
> http://www.freebsd.org/cgi/query-pr.cgi?pr=155558
> 
> Signed-off-by: Ed Maste <emaste@freebsd.org>
> ---
>  bsd-user/syscall.c | 4 ++++
>  1 file changed, 4 insertions(+)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types
  2013-04-25 17:59 [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types Ed Maste
  2013-04-26 10:57 ` Stefan Hajnoczi
  2013-04-26 11:09 ` Stefan Hajnoczi
@ 2013-04-26 17:13 ` Patrick Welche
  2 siblings, 0 replies; 4+ messages in thread
From: Patrick Welche @ 2013-04-26 17:13 UTC (permalink / raw)
  To: Ed Maste; +Cc: qemu-trivial

On Thu, Apr 25, 2013 at 01:59:41PM -0400, Ed Maste wrote:
> Originally from Garrett Cooper in FreeBSD PR ports/155558
> http://www.freebsd.org/cgi/query-pr.cgi?pr=155558
> 
> Signed-off-by: Ed Maste <emaste@freebsd.org>
> ---
>  bsd-user/syscall.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
> index 18b43f1..69e3466 100644
> --- a/bsd-user/syscall.c
> +++ b/bsd-user/syscall.c
> @@ -211,7 +211,11 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind)
>          *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
>          break;
>  #endif
> +#if !defined(__FreeBSD_version) || __FreeBSD_version < 900031
>      case CTLTYPE_QUAD:
> +#else
> +    case CTLTYPE_U64:
> +#endif
>          *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
>          break;
>      case CTLTYPE_STRING:

Would something OS agnostic such as

#ifdef CTLTYPE_U64
    case CTLTYPE_U64:
#else
    case CTLTYPE_QUAD:
#endif

have done?

Cheers,

Patrick


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-26 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 17:59 [Qemu-trivial] [PATCH] Track change in FreeBSD SYSCTL(9) types Ed Maste
2013-04-26 10:57 ` Stefan Hajnoczi
2013-04-26 11:09 ` Stefan Hajnoczi
2013-04-26 17:13 ` Patrick Welche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).