Skip to content

Commit

Permalink
hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getver…
Browse files Browse the repository at this point in the history
…sion()

All get_st_gen() implementations except handle_ioc_getversion() have
guard for undefined FS_IOC_GETVERSION. Let's add it there too.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  • Loading branch information
kiryl authored and kvaneesh committed Feb 2, 2014
1 parent 0e5fc99 commit b931766
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hw/9pfs/virtio-9p-handle.c
Expand Up @@ -582,6 +582,7 @@ static int handle_unlinkat(FsContext *ctx, V9fsPath *dir,
static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path,
mode_t st_mode, uint64_t *st_gen)
{
#ifdef FS_IOC_GETVERSION
int err;
V9fsFidOpenState fid_open;

Expand All @@ -599,6 +600,10 @@ static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path,
err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen);
handle_close(ctx, &fid_open);
return err;
#else
errno = ENOTTY;
return -1;
#endif
}

static int handle_init(FsContext *ctx)
Expand Down

0 comments on commit b931766

Please sign in to comment.