qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h


From: Richard Henderson
Subject: Re: [PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h
Date: Thu, 13 Apr 2023 11:53:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 4/12/23 16:21, Warner Losh wrote:


On Wed, Apr 12, 2023 at 4:10 AM Richard Henderson <richard.henderson@linaro.org <mailto:richard.henderson@linaro.org>> wrote:

    On 4/11/23 19:09, Warner Losh wrote:
     > +++ b/bsd-user/syscallhdr.sh
     > @@ -0,0 +1,7 @@
     > +#!/bin/sh
     > +
     > +in="$1"
     > +out="$2"
     > +bsd="$3"
     > +
     > +awk -v bsd="$3" '{sub("SYS_", "TARGET_" bsd "_NR_", $0); print;}' < $in 
> $out

    If the host/guest syscall numbers always match, there's no point in using
    TARGET_freebsd_NR_foo at all -- just use the original SYS_foo symbol from 
<sys/syscall.h>.


long term, this is likely correct. Short term, though, changing to SYS_foo would cause quite a bit of churn that I'm looking to avoid.

Fair.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]