aboutsummaryrefslogtreecommitdiff
path: root/fsdev
diff options
context:
space:
mode:
Diffstat (limited to 'fsdev')
-rw-r--r--fsdev/9p-iov-marshal.c4
-rw-r--r--fsdev/virtfs-proxy-helper.c11
2 files changed, 8 insertions, 7 deletions
diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c
index 1d16f8df4b..a1c9beddd2 100644
--- a/fsdev/9p-iov-marshal.c
+++ b/fsdev/9p-iov-marshal.c
@@ -168,7 +168,7 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
break;
}
default:
- break;
+ g_assert_not_reached();
}
if (copied < 0) {
return copied;
@@ -281,7 +281,7 @@ ssize_t v9fs_iov_vmarshal(struct iovec *in_sg, int in_num, size_t offset,
break;
}
default:
- break;
+ g_assert_not_reached();
}
if (copied < 0) {
return copied;
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index 54f7ad1c48..6c066ec9a0 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -945,7 +945,8 @@ static int process_requests(int sock)
&spec[0].tv_sec, &spec[0].tv_nsec,
&spec[1].tv_sec, &spec[1].tv_nsec);
if (retval > 0) {
- retval = qemu_utimens(path.data, spec);
+ retval = utimensat(AT_FDCWD, path.data, spec,
+ AT_SYMLINK_NOFOLLOW);
if (retval < 0) {
retval = -errno;
}
@@ -1129,14 +1130,14 @@ int main(int argc, char **argv)
}
}
- if (chdir("/") < 0) {
- do_perror("chdir");
- goto error;
- }
if (chroot(rpath) < 0) {
do_perror("chroot");
goto error;
}
+ if (chdir("/") < 0) {
+ do_perror("chdir");
+ goto error;
+ }
get_version = false;
#ifdef FS_IOC_GETVERSION