Message ID | 20180610030220.3777-64-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2602394lji; Sat, 9 Jun 2018 20:55:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIsiJF0B/OZVA8hfW0NrCxtnuYdenZPHDh3QXbNvVvzCl9rOEDt/WenB/N9LT1KhMbJqGyi X-Received: by 2002:ac8:2f2a:: with SMTP id j39-v6mr11638794qta.74.1528602904966; Sat, 09 Jun 2018 20:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528602904; cv=none; d=google.com; s=arc-20160816; b=NOakxHJPxHx0BTDjRLZ2yKFQmJda0xp3isNL3ARDBUgZ7RSGK1+YCziX/lOVEZ7DbB iWhZOJHKiHcaln1tsftC9ko5tbLH7mcMo46+QVPAp6DvA5mPw+Z2mnV2pjVGtKox5n5P KGHMVCNgK4jBB0ZIslfOoWOHhvvQKcMONy65g3x6praabqCZtL7z1ebe09XBx1pBIROb uHl1gba4dya+ioMoIqfedLp3d2aweKNDL17gjxXD6oYWlS6E4O3pLCKY/Z/Gt8uMTroH 0WRaJIWonmz3J8n92XqldWhWjZEg+EweRdxJG21P7RPKK5cddQz/Q/dHBxJxJXQ1KJwP B6Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=OJ64N1ZkPa33+gTHoTwS9Q5hpSvK2Sp61kAqUtj5TKk=; b=YB9SyZs+86i27x9SIo1ktxaBWOl7mhQWjzftlXH5+RAZp1zEiaE+YWxl9aIMIdzWD9 paItkvMxtye/IabJ16LsktkSWZ6kCowViNHNWYbQZUVtrhE96wkskepAKCT+9cinfsZQ EraGQn2Xe4hn6dC8pPDrvNwkE6nTkIfex2hJzcHnGCICV4SMil3rZIyvD90rY/DY3Fkb a/9LAmQSGfjGQAfu0e2t8MKMA4p1BN+c0FanlAqTA+R14XZFdWxB4Aj2cg8FwqEW6TZV mIzqrTKcsv4OieRR+V6csuWJk31gc/wWxqsIxtGx9CHAJlj+3fJFQAJ+JazNvsg8GGhP MU5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LgKDm/b+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id m38-v6si9234585qtm.176.2018.06.09.20.55.04 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 20:55:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LgKDm/b+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fRrRY-0007Mi-DW for patch@linaro.org; Sat, 09 Jun 2018 23:55:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqeq-0003V2-75 for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqep-0003uj-9K for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:44 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:40578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqep-0003tw-3O for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:43 -0400 Received: by mail-pf0-x241.google.com with SMTP id z24-v6so8491137pfe.7 for <qemu-devel@nongnu.org>; Sat, 09 Jun 2018 20:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OJ64N1ZkPa33+gTHoTwS9Q5hpSvK2Sp61kAqUtj5TKk=; b=LgKDm/b+3I435FwO3c48pXlf6TbQhBwXLtxVVLr4k4bgeKf8KkLiJrLKgCcC8qqxoF pDRcW7LNSeI5aHSzHNZEG4OPF/6f88FRIZ6s1w2n0HE3/ZbjHaMb3m9zZrVwxgFKL7tq H7VBLFFp1AciQKszhkwz1H0iQxMzfL8HNNIwM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OJ64N1ZkPa33+gTHoTwS9Q5hpSvK2Sp61kAqUtj5TKk=; b=cgGj2PKWh4aqD7IMvgOXEK2Lyh7jOT659vmJBCRSO74RzcF44VzzB7MXxLvq7JJoFP zgQMuEht07+sAW8AHVsK2g3t/ZCsh/dslCdesILK130FT3vnTXLkVN/hitbscqUUatR6 Bq2PeRX3RnRi77cldTdVrZIX5u0Kj+5J+iVea31KkMHwCmM44zyQ0LnY/KK/QAMwLUvX bKYr81tIeePqMyQA5K4k0t+e5eGLGWguaeKJtsFP4AcbTVP34LpGdDAiYySUHmZb6DDP W6UMzNbF6782IK8oukSvS7ttNl1kKYDwwn2OebBmoe95/+oEqqYf+awDzmOkLNbXOP16 QPiA== X-Gm-Message-State: APt69E0rjGRqKzC2yjEPA0+KAYOkgunGUevPW8ktvHmorZgI/IrdEGSF vUWz5a/Q45SD0/qZ5GoXVRpCI37et0Q= X-Received: by 2002:a65:4cc3:: with SMTP id n3-v6mr10270115pgt.98.1528599881911; Sat, 09 Jun 2018 20:04:41 -0700 (PDT) Received: from cloudburst.twiddle.net (rrcs-173-198-77-219.west.biz.rr.com. [173.198.77.219]) by smtp.gmail.com with ESMTPSA id y17-v6sm31712718pfe.33.2018.06.09.20.04.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:04:41 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:01:35 -1000 Message-Id: <20180610030220.3777-64-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180610030220.3777-1-richard.henderson@linaro.org> References: <20180610030220.3777-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH v2 063/108] linux-user: Split out fdatasync, getsid, _sysctl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
linux-user: Split do_syscall
|
expand
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 07fa043965..1907b32499 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8043,6 +8043,11 @@ IMPL(fcntl) } #endif +IMPL(fdatasync) +{ + return get_errno(fdatasync(arg1)); +} + IMPL(flock) { /* The flock constant seems to be the same for every Linux platform. */ @@ -8403,6 +8408,11 @@ IMPL(getrusage) return ret; } +IMPL(getsid) +{ + return get_errno(getsid(arg1)); +} + #ifdef TARGET_NR_getsockname IMPL(getsockname) { @@ -10465,6 +10475,14 @@ IMPL(syncfs) } #endif +#ifdef TARGET_NR__sysctl +IMPL(_sysctl) +{ + /* We don't implement this, but ENOTDIR is always a safe return value. */ + return -TARGET_ENOTDIR; +} +#endif + IMPL(sysinfo) { struct sysinfo value; @@ -10841,18 +10859,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, void *p; switch(num) { - case TARGET_NR_getsid: - return get_errno(getsid(arg1)); -#if defined(TARGET_NR_fdatasync) /* Not on alpha (osf_datasync ?) */ - case TARGET_NR_fdatasync: - return get_errno(fdatasync(arg1)); -#endif -#ifdef TARGET_NR__sysctl - case TARGET_NR__sysctl: - /* We don't implement this, but ENOTDIR is always a safe - return value. */ - return -TARGET_ENOTDIR; -#endif case TARGET_NR_sched_getaffinity: { unsigned int mask_size; @@ -12958,6 +12964,7 @@ static impl_fn *syscall_table(unsigned num) #ifdef TARGET_NR_fcntl SYSCALL(fcntl); #endif + SYSCALL(fdatasync); SYSCALL(flock); #ifdef TARGET_NR_fork SYSCALL(fork); @@ -12996,6 +13003,7 @@ static impl_fn *syscall_table(unsigned num) SYSCALL(getrandom); SYSCALL(getrlimit); SYSCALL(getrusage); + SYSCALL(getsid); #ifdef TARGET_NR_getsockname SYSCALL(getsockname); #endif @@ -13234,6 +13242,9 @@ static impl_fn *syscall_table(unsigned num) SYSCALL(sync); #ifdef CONFIG_SYNCFS SYSCALL(syncfs); +#endif +#ifdef TARGET_NR__sysctl + SYSCALL(_sysctl); #endif SYSCALL(sysinfo); SYSCALL(syslog);
All targets define fdatasync; remove the ifdef. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) -- 2.17.1