From patchwork Wed May 8 23:49:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel de Perthuis X-Patchwork-Id: 242675 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 166402C00FC for ; Thu, 9 May 2013 09:54:45 +1000 (EST) Received: from localhost ([::1]:35729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaEC3-0000nm-C5 for incoming@patchwork.ozlabs.org; Wed, 08 May 2013 19:54:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaE71-0007ig-F7 for qemu-devel@nongnu.org; Wed, 08 May 2013 19:49:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaE6z-0002Tx-4c for qemu-devel@nongnu.org; Wed, 08 May 2013 19:49:31 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:47796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaE6y-0002Tq-Ub; Wed, 08 May 2013 19:49:29 -0400 Received: by mail-we0-f181.google.com with SMTP id q55so2325222wes.12 for ; Wed, 08 May 2013 16:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:content-type:content-transfer-encoding; bh=W0fSxB00jDGz3Y+i7NSNbhbK9ngvyofJ2hF1UbWrCOY=; b=rCuSH6dgdWM0N792mxGwWgUklXnhg7PZOdpNQLXdz8lu3G3qJl970hDvPLTLrqXy60 RLV3vaLNWQOUtwi8SsiS8HoFMUjnoJHElbBbuE546l+QYdbmvZJKkB+IWQ4BQbA+SgRv LRai/4v7E+I4yYR9ZAjkHyoZVLjGg2MaFcHSCaQUYZwnplvWLeNHLCRV3U/0YmNDYeK1 +uIuBNEuW6butDw/NrpZFutmWzXOj2xCTw4ZF6xMej1KtYzvGcHNzsTaalnBYssiPebP FA+LZC1O5uDzxUuXTFzsRH267IVxiAlTf7Rz9itGFhq1vpn59pE1N/2+COK5wokZ12Ej Zc0A== X-Received: by 10.194.58.163 with SMTP id s3mr14270626wjq.6.1368056968094; Wed, 08 May 2013 16:49:28 -0700 (PDT) Received: from ?IPv6:2a01:e35:8a2c:b230:998e:383e:ebba:8709? ([2a01:e35:8a2c:b230:998e:383e:ebba:8709]) by mx.google.com with ESMTPSA id c5sm12314441wiz.11.2013.05.08.16.49.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 May 2013 16:49:27 -0700 (PDT) Message-ID: <518AE484.9090204@gmail.com> Date: Thu, 09 May 2013 01:49:24 +0200 From: Gabriel de Perthuis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 MIME-Version: 1.0 To: "Aneesh Kumar K.V" , qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::235 X-Mailman-Approved-At: Wed, 08 May 2013 19:53:40 -0400 Cc: qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH] 9p: Be robust against paths without FS_IOC_GETVERSION 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 The current implementation checked for supported filesystems at mount time, but actual support depends on the path. Don't error out when finding unversioned paths. This fix allows booting a linux kernel with the same / filesystem as the host; otherwise the boot fails when mounting devtmpfs. Signed-off-by: Gabriel de Perthuis Reviewed-by: Aneesh Kumar K.V --- hw/9pfs/cofile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c index 2efebf3..194c130 100644 --- a/hw/9pfs/cofile.c +++ b/hw/9pfs/cofile.c @@ -36,10 +36,14 @@ int v9fs_co_st_gen(V9fsPDU *pdu, V9fsPath *path, mode_t st_mode, err = -errno; } }); v9fs_path_unlock(s); } + /* The ioctl may not be supported depending on the path */ + if (err == -ENOTTY) { + err = 0; + } return err; } int v9fs_co_lstat(V9fsPDU *pdu, V9fsPath *path, struct stat *stbuf) {