Revision e95ead32 hw/virtio-9p-local.c
b/hw/virtio-9p-local.c | ||
---|---|---|
129 | 129 |
return writev(fd, iov, iovcnt); |
130 | 130 |
} |
131 | 131 |
|
132 |
static int local_chmod(FsContext *ctx, const char *path, mode_t mode)
|
|
132 |
static int local_chmod(FsContext *fs_ctx, const char *path, FsCred *credp)
|
|
133 | 133 |
{ |
134 |
return chmod(rpath(ctx, path), mode); |
|
134 |
if (fs_ctx->fs_sm == SM_MAPPED) { |
|
135 |
return local_set_xattr(rpath(fs_ctx, path), credp); |
|
136 |
} else if (fs_ctx->fs_sm == SM_PASSTHROUGH) { |
|
137 |
return chmod(rpath(fs_ctx, path), credp->fc_mode); |
|
138 |
} |
|
139 |
return -1; |
|
135 | 140 |
} |
136 | 141 |
|
137 | 142 |
static int local_mknod(FsContext *ctx, const char *path, mode_t mode, dev_t dev) |
... | ... | |
253 | 258 |
|
254 | 259 |
static int local_fsync(FsContext *ctx, int fd) |
255 | 260 |
{ |
256 |
if (0) /* Just to supress the warning. Will be removed in next patch. */ |
|
257 |
(void)local_set_xattr(NULL, NULL); |
|
258 | 261 |
return fsync(fd); |
259 | 262 |
} |
260 | 263 |
|
Also available in: Unified diff