hw/9pfs: Be robust against paths without FS_IOC_GETVERSION
commitdb431f6adc881a0758512cd765b3108209013512
authorGabriel de Perthuis <g2p.code@gmail.com>
Fri, 10 May 2013 17:53:28 +0000 (10 19:53 +0200)
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 28 May 2013 09:53:12 +0000 (28 15:23 +0530)
tree511e6941fab20b72140bf38b1bdb486d21426252
parent0ceb092e35f9d8793d64d86194ec9463718dffa3
hw/9pfs: Be robust against paths without FS_IOC_GETVERSION

9P optionally uses the FS_IOC_GETVERSION ioctl to get information about
a file's version (sometimes called generation number).

The code checks for supported filesystems at mount time, but some paths
may come from other mounted filesystems.

Change it to treat unsupported paths the same as unsupported
filesystems, returning 0 in both cases.

Note: ENOTTY is the error code for an unsupported ioctl.

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 <g2p.code@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs/cofile.c