From ae0f940e6b4f5177892dd6a12762282fa9089972 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 21 Nov 2011 09:29:11 +0100 Subject: 9pfs: improve portability to older systems Small requirements on "new" features have percolated to virtio-9p-local.c. In particular, the utimensat wrapper actually only supports dirfd = AT_FDCWD and flags = AT_SYMLINK_NOFOLLOW in the fallback code. Remove the arguments so that virtio-9p-local.c will not use AT_* constants. At the same time, fail local_ioc_getversion if the ioctl is not supported by the host. Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- oslib-posix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'oslib-posix.c') diff --git a/oslib-posix.c b/oslib-posix.c index 6f297626c7..ce755496b5 100644 --- a/oslib-posix.c +++ b/oslib-posix.c @@ -162,8 +162,7 @@ int qemu_pipe(int pipefd[2]) return ret; } -int qemu_utimensat(int dirfd, const char *path, const struct timespec *times, - int flags) +int qemu_utimens(const char *path, const struct timespec *times) { struct timeval tv[2], tv_now; struct stat st; @@ -171,7 +170,7 @@ int qemu_utimensat(int dirfd, const char *path, const struct timespec *times, #ifdef CONFIG_UTIMENSAT int ret; - ret = utimensat(dirfd, path, times, flags); + ret = utimensat(AT_FDCWD, path, times, AT_SYMLINK_NOFOLLOW); if (ret != -1 || errno != ENOSYS) { return ret; } -- cgit v1.2.3-55-g7522