mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 10:25:06 +00:00
hw/9pfs: fix error handing in local_ioc_getversion()
v9fs_co_st_gen() expects to see error code in errno, not in return code. Let's fix this. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
2f61120c10
commit
0e5fc994d2
@ -1068,8 +1068,8 @@ err_out:
|
|||||||
static int local_ioc_getversion(FsContext *ctx, V9fsPath *path,
|
static int local_ioc_getversion(FsContext *ctx, V9fsPath *path,
|
||||||
mode_t st_mode, uint64_t *st_gen)
|
mode_t st_mode, uint64_t *st_gen)
|
||||||
{
|
{
|
||||||
int err;
|
|
||||||
#ifdef FS_IOC_GETVERSION
|
#ifdef FS_IOC_GETVERSION
|
||||||
|
int err;
|
||||||
V9fsFidOpenState fid_open;
|
V9fsFidOpenState fid_open;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1085,10 +1085,11 @@ static int local_ioc_getversion(FsContext *ctx, V9fsPath *path,
|
|||||||
}
|
}
|
||||||
err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen);
|
err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen);
|
||||||
local_close(ctx, &fid_open);
|
local_close(ctx, &fid_open);
|
||||||
#else
|
|
||||||
err = -ENOTTY;
|
|
||||||
#endif
|
|
||||||
return err;
|
return err;
|
||||||
|
#else
|
||||||
|
errno = ENOTTY;
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int local_init(FsContext *ctx)
|
static int local_init(FsContext *ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user