From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaDro-0006i2-J4 for qemu-devel@nongnu.org; Wed, 08 May 2013 19:33:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaDrl-0006NU-U8 for qemu-devel@nongnu.org; Wed, 08 May 2013 19:33:48 -0400 Message-ID: <518AE0D5.9010307@gmail.com> Date: Thu, 09 May 2013 01:33:41 +0200 From: Gabriel de Perthuis MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000601020803010902050700" Subject: [Qemu-devel] [PATCH] 9p: Be robust against paths without FS_IOC_GETVERSION List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K.V" , qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org This is a multi-part message in MIME format. --------------000601020803010902050700 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --- 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) { -- 1.8.2.1.419.ga0b97c6 --------------000601020803010902050700 Content-Type: text/plain; charset=UTF-8; name="Portion de message joint" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Portion de message joint" --------------000601020803010902050700--