From patchwork Fri Jan 4 04:29:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dillona@dillona.com X-Patchwork-Id: 209362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3544F2C008F for ; Fri, 4 Jan 2013 15:29:30 +1100 (EST) Received: from localhost ([::1]:55293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqyuO-0004jW-IM for incoming@patchwork.ozlabs.org; Thu, 03 Jan 2013 23:29:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqyuE-0004iY-M3 for qemu-devel@nongnu.org; Thu, 03 Jan 2013 23:29:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqyuA-0003jx-BE for qemu-devel@nongnu.org; Thu, 03 Jan 2013 23:29:18 -0500 Received: from mail-gh0-f179.google.com ([209.85.160.179]:61634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqyuA-0003jr-5P for qemu-devel@nongnu.org; Thu, 03 Jan 2013 23:29:14 -0500 Received: by mail-gh0-f179.google.com with SMTP id r14so1929965ghr.10 for ; Thu, 03 Jan 2013 20:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer; bh=B9FYD6VzntmqaPwnG3aWthbIdjB8HZ4C2fvlTdpdN9E=; b=GB11OE7naM7Cp9K1WttKwWGVdJq5NAqd0OLn1ziBWYzSOGpKOBw98PbEW7r9X3zNr1 9a7Dg/dGpsGPByioPle05Ivhm3bUIdR8qaI6sKlwDk5SJggWnhmhD3ls5SS16ERU3Ffr RQCBqKNYCwUxgTShvuNq1fOlpMB7VW9Uahhq9tb61OTb1MBVIJXwkvThu4cEvCPp9MiT JcKWx0Ei0iqRopyycTyBlayZguRjUg19tUDw6QqU2dvArxjfS0ibUkCaENAnRM1TXZu1 HqVYMne8bXN8RGL3R3+8/bPTwFBVhZBhHxbIr3glAMTiHdjRzSFzytAddAys4hQp4gtL MDRg== X-Received: by 10.236.71.197 with SMTP id r45mr52574831yhd.113.1357273753757; Thu, 03 Jan 2013 20:29:13 -0800 (PST) Received: from localhost.localdomain (adsl-065-005-251-121.sip.bgk.bellsouth.net. [65.5.251.121]) by mx.google.com with ESMTPS id z1sm46153739anj.2.2013.01.03.20.29.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Jan 2013 20:29:12 -0800 (PST) From: dillona@dillona.com To: qemu-devel@nongnu.org Date: Thu, 3 Jan 2013 23:29:06 -0500 Message-Id: <1357273746-21133-1-git-send-email-dillona@dillona.com> X-Mailer: git-send-email 1.7.5.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.179 Cc: riku.voipio@iki.fi, Dillon Amburgey Subject: [Qemu-devel] [PATCH] linux-user: Rewrite deprecated fnctl options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Dillon Amburgey glibc on alpha still uses these Signed-off-by: Dillon Amburgey --- linux-user/syscall.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e99adab..cb19ba1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4558,6 +4558,10 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) fl.l_start = tswapal(target_fl->l_start); fl.l_len = tswapal(target_fl->l_len); fl.l_pid = tswap32(target_fl->l_pid); + if (fl.l_type == F_SHLCK) + fl.l_type = F_RDLCK; + if (fl.l_type == F_EXLCK) + fl.l_type = F_WRLCK; unlock_user_struct(target_fl, arg, 0); ret = get_errno(fcntl(fd, host_cmd, &fl)); break;