]>
Commit | Line | Data |
---|---|---|
9db221ae | 1 | /* |
aae91ad9 | 2 | * 9p synthetic file system support |
9db221ae AK |
3 | * |
4 | * Copyright IBM, Corp. 2011 | |
5 | * | |
6 | * Authors: | |
7 | * Malahal Naineni <malahal@us.ibm.com> | |
8 | * Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | |
9 | * | |
10 | * This work is licensed under the terms of the GNU GPL, version 2. See | |
11 | * the COPYING file in the top-level directory. | |
12 | * | |
13 | */ | |
14 | ||
fbc04127 | 15 | #include "qemu/osdep.h" |
ebe74f8b | 16 | #include "9p.h" |
9db221ae | 17 | #include "fsdev/qemu-fsdev.h" |
364031f1 | 18 | #include "9p-synth.h" |
7911747b | 19 | #include "qemu/rcu.h" |
341774fe | 20 | #include "qemu/rcu_queue.h" |
f348b6d1 | 21 | #include "qemu/cutils.h" |
2893ddd5 | 22 | #include "sysemu/qtest.h" |
9db221ae AK |
23 | |
24 | /* Root node for synth file system */ | |
b05528b5 | 25 | static V9fsSynthNode synth_root = { |
9db221ae AK |
26 | .name = "/", |
27 | .actual_attr = { | |
28 | .mode = 0555 | S_IFDIR, | |
29 | .nlink = 1, | |
30 | }, | |
b05528b5 | 31 | .attr = &synth_root.actual_attr, |
9db221ae AK |
32 | }; |
33 | ||
b05528b5 GK |
34 | static QemuMutex synth_mutex; |
35 | static int synth_node_count; | |
9db221ae | 36 | /* set to 1 when the synth fs is ready */ |
b05528b5 | 37 | static int synth_fs; |
9db221ae AK |
38 | |
39 | static V9fsSynthNode *v9fs_add_dir_node(V9fsSynthNode *parent, int mode, | |
40 | const char *name, | |
41 | V9fsSynthNodeAttr *attr, int inode) | |
42 | { | |
43 | V9fsSynthNode *node; | |
44 | ||
45 | /* Add directory type and remove write bits */ | |
46 | mode = ((mode & 0777) | S_IFDIR) & ~(S_IWUSR | S_IWGRP | S_IWOTH); | |
47 | node = g_malloc0(sizeof(V9fsSynthNode)); | |
48 | if (attr) { | |
49 | /* We are adding .. or . entries */ | |
50 | node->attr = attr; | |
51 | node->attr->nlink++; | |
52 | } else { | |
53 | node->attr = &node->actual_attr; | |
54 | node->attr->inode = inode; | |
55 | node->attr->nlink = 1; | |
56 | /* We don't allow write to directories */ | |
57 | node->attr->mode = mode; | |
58 | node->attr->write = NULL; | |
59 | node->attr->read = NULL; | |
60 | } | |
61 | node->private = node; | |
a79b5f8b | 62 | pstrcpy(node->name, sizeof(node->name), name); |
2583e443 | 63 | QLIST_INSERT_HEAD_RCU(&parent->child, node, sibling); |
9db221ae AK |
64 | return node; |
65 | } | |
66 | ||
67 | int qemu_v9fs_synth_mkdir(V9fsSynthNode *parent, int mode, | |
68 | const char *name, V9fsSynthNode **result) | |
69 | { | |
70 | int ret; | |
71 | V9fsSynthNode *node, *tmp; | |
72 | ||
b05528b5 | 73 | if (!synth_fs) { |
9db221ae AK |
74 | return EAGAIN; |
75 | } | |
76 | if (!name || (strlen(name) >= NAME_MAX)) { | |
77 | return EINVAL; | |
78 | } | |
79 | if (!parent) { | |
b05528b5 | 80 | parent = &synth_root; |
9db221ae | 81 | } |
b05528b5 | 82 | qemu_mutex_lock(&synth_mutex); |
9db221ae AK |
83 | QLIST_FOREACH(tmp, &parent->child, sibling) { |
84 | if (!strcmp(tmp->name, name)) { | |
85 | ret = EEXIST; | |
86 | goto err_out; | |
87 | } | |
88 | } | |
89 | /* Add the name */ | |
b05528b5 | 90 | node = v9fs_add_dir_node(parent, mode, name, NULL, synth_node_count++); |
9db221ae AK |
91 | v9fs_add_dir_node(node, parent->attr->mode, "..", |
92 | parent->attr, parent->attr->inode); | |
93 | v9fs_add_dir_node(node, node->attr->mode, ".", | |
94 | node->attr, node->attr->inode); | |
95 | *result = node; | |
96 | ret = 0; | |
97 | err_out: | |
b05528b5 | 98 | qemu_mutex_unlock(&synth_mutex); |
9db221ae AK |
99 | return ret; |
100 | } | |
101 | ||
102 | int qemu_v9fs_synth_add_file(V9fsSynthNode *parent, int mode, | |
103 | const char *name, v9fs_synth_read read, | |
104 | v9fs_synth_write write, void *arg) | |
105 | { | |
106 | int ret; | |
107 | V9fsSynthNode *node, *tmp; | |
108 | ||
b05528b5 | 109 | if (!synth_fs) { |
9db221ae AK |
110 | return EAGAIN; |
111 | } | |
112 | if (!name || (strlen(name) >= NAME_MAX)) { | |
113 | return EINVAL; | |
114 | } | |
115 | if (!parent) { | |
b05528b5 | 116 | parent = &synth_root; |
9db221ae AK |
117 | } |
118 | ||
b05528b5 | 119 | qemu_mutex_lock(&synth_mutex); |
9db221ae AK |
120 | QLIST_FOREACH(tmp, &parent->child, sibling) { |
121 | if (!strcmp(tmp->name, name)) { | |
122 | ret = EEXIST; | |
123 | goto err_out; | |
124 | } | |
125 | } | |
126 | /* Add file type and remove write bits */ | |
127 | mode = ((mode & 0777) | S_IFREG); | |
128 | node = g_malloc0(sizeof(V9fsSynthNode)); | |
129 | node->attr = &node->actual_attr; | |
b05528b5 | 130 | node->attr->inode = synth_node_count++; |
9db221ae AK |
131 | node->attr->nlink = 1; |
132 | node->attr->read = read; | |
133 | node->attr->write = write; | |
134 | node->attr->mode = mode; | |
135 | node->private = arg; | |
a79b5f8b | 136 | pstrcpy(node->name, sizeof(node->name), name); |
2583e443 | 137 | QLIST_INSERT_HEAD_RCU(&parent->child, node, sibling); |
9db221ae AK |
138 | ret = 0; |
139 | err_out: | |
b05528b5 | 140 | qemu_mutex_unlock(&synth_mutex); |
9db221ae AK |
141 | return ret; |
142 | } | |
143 | ||
b05528b5 | 144 | static void synth_fill_statbuf(V9fsSynthNode *node, struct stat *stbuf) |
9db221ae AK |
145 | { |
146 | stbuf->st_dev = 0; | |
147 | stbuf->st_ino = node->attr->inode; | |
148 | stbuf->st_mode = node->attr->mode; | |
149 | stbuf->st_nlink = node->attr->nlink; | |
150 | stbuf->st_uid = 0; | |
151 | stbuf->st_gid = 0; | |
152 | stbuf->st_rdev = 0; | |
153 | stbuf->st_size = 0; | |
154 | stbuf->st_blksize = 0; | |
155 | stbuf->st_blocks = 0; | |
156 | stbuf->st_atime = 0; | |
157 | stbuf->st_mtime = 0; | |
158 | stbuf->st_ctime = 0; | |
159 | } | |
160 | ||
b05528b5 | 161 | static int synth_lstat(FsContext *fs_ctx, |
9db221ae AK |
162 | V9fsPath *fs_path, struct stat *stbuf) |
163 | { | |
164 | V9fsSynthNode *node = *(V9fsSynthNode **)fs_path->data; | |
165 | ||
b05528b5 | 166 | synth_fill_statbuf(node, stbuf); |
9db221ae AK |
167 | return 0; |
168 | } | |
169 | ||
b05528b5 | 170 | static int synth_fstat(FsContext *fs_ctx, int fid_type, |
9db221ae AK |
171 | V9fsFidOpenState *fs, struct stat *stbuf) |
172 | { | |
173 | V9fsSynthOpenState *synth_open = fs->private; | |
b05528b5 | 174 | synth_fill_statbuf(synth_open->node, stbuf); |
9db221ae AK |
175 | return 0; |
176 | } | |
177 | ||
b05528b5 | 178 | static int synth_opendir(FsContext *ctx, |
9db221ae AK |
179 | V9fsPath *fs_path, V9fsFidOpenState *fs) |
180 | { | |
181 | V9fsSynthOpenState *synth_open; | |
182 | V9fsSynthNode *node = *(V9fsSynthNode **)fs_path->data; | |
183 | ||
184 | synth_open = g_malloc(sizeof(*synth_open)); | |
185 | synth_open->node = node; | |
186 | node->open_count++; | |
187 | fs->private = synth_open; | |
188 | return 0; | |
189 | } | |
190 | ||
b05528b5 | 191 | static int synth_closedir(FsContext *ctx, V9fsFidOpenState *fs) |
9db221ae AK |
192 | { |
193 | V9fsSynthOpenState *synth_open = fs->private; | |
194 | V9fsSynthNode *node = synth_open->node; | |
195 | ||
196 | node->open_count--; | |
197 | g_free(synth_open); | |
198 | fs->private = NULL; | |
199 | return 0; | |
200 | } | |
201 | ||
b05528b5 | 202 | static off_t synth_telldir(FsContext *ctx, V9fsFidOpenState *fs) |
9db221ae AK |
203 | { |
204 | V9fsSynthOpenState *synth_open = fs->private; | |
205 | return synth_open->offset; | |
206 | } | |
207 | ||
b05528b5 | 208 | static void synth_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off) |
9db221ae AK |
209 | { |
210 | V9fsSynthOpenState *synth_open = fs->private; | |
211 | synth_open->offset = off; | |
212 | } | |
213 | ||
b05528b5 | 214 | static void synth_rewinddir(FsContext *ctx, V9fsFidOpenState *fs) |
9db221ae | 215 | { |
b05528b5 | 216 | synth_seekdir(ctx, fs, 0); |
9db221ae AK |
217 | } |
218 | ||
b05528b5 | 219 | static void synth_direntry(V9fsSynthNode *node, |
9db221ae AK |
220 | struct dirent *entry, off_t off) |
221 | { | |
222 | strcpy(entry->d_name, node->name); | |
223 | entry->d_ino = node->attr->inode; | |
224 | entry->d_off = off + 1; | |
225 | } | |
226 | ||
b05528b5 | 227 | static struct dirent *synth_get_dentry(V9fsSynthNode *dir, |
635324e8 | 228 | struct dirent *entry, off_t off) |
9db221ae AK |
229 | { |
230 | int i = 0; | |
231 | V9fsSynthNode *node; | |
232 | ||
2583e443 | 233 | rcu_read_lock(); |
9db221ae AK |
234 | QLIST_FOREACH(node, &dir->child, sibling) { |
235 | /* This is the off child of the directory */ | |
236 | if (i == off) { | |
237 | break; | |
238 | } | |
239 | i++; | |
240 | } | |
2583e443 | 241 | rcu_read_unlock(); |
9db221ae AK |
242 | if (!node) { |
243 | /* end of directory */ | |
635324e8 | 244 | return NULL; |
9db221ae | 245 | } |
b05528b5 | 246 | synth_direntry(node, entry, off); |
635324e8 | 247 | return entry; |
9db221ae AK |
248 | } |
249 | ||
b05528b5 | 250 | static struct dirent *synth_readdir(FsContext *ctx, V9fsFidOpenState *fs) |
9db221ae | 251 | { |
635324e8 | 252 | struct dirent *entry; |
9db221ae AK |
253 | V9fsSynthOpenState *synth_open = fs->private; |
254 | V9fsSynthNode *node = synth_open->node; | |
b05528b5 | 255 | entry = synth_get_dentry(node, &synth_open->dent, synth_open->offset); |
635324e8 | 256 | if (entry) { |
9db221ae AK |
257 | synth_open->offset++; |
258 | } | |
635324e8 | 259 | return entry; |
9db221ae AK |
260 | } |
261 | ||
b05528b5 | 262 | static int synth_open(FsContext *ctx, V9fsPath *fs_path, |
9db221ae AK |
263 | int flags, V9fsFidOpenState *fs) |
264 | { | |
265 | V9fsSynthOpenState *synth_open; | |
266 | V9fsSynthNode *node = *(V9fsSynthNode **)fs_path->data; | |
267 | ||
268 | synth_open = g_malloc(sizeof(*synth_open)); | |
269 | synth_open->node = node; | |
270 | node->open_count++; | |
271 | fs->private = synth_open; | |
272 | return 0; | |
273 | } | |
274 | ||
b05528b5 | 275 | static int synth_open2(FsContext *fs_ctx, V9fsPath *dir_path, |
9db221ae AK |
276 | const char *name, int flags, |
277 | FsCred *credp, V9fsFidOpenState *fs) | |
278 | { | |
279 | errno = ENOSYS; | |
280 | return -1; | |
281 | } | |
282 | ||
b05528b5 | 283 | static int synth_close(FsContext *ctx, V9fsFidOpenState *fs) |
9db221ae AK |
284 | { |
285 | V9fsSynthOpenState *synth_open = fs->private; | |
286 | V9fsSynthNode *node = synth_open->node; | |
287 | ||
288 | node->open_count--; | |
289 | g_free(synth_open); | |
290 | fs->private = NULL; | |
291 | return 0; | |
292 | } | |
293 | ||
b05528b5 | 294 | static ssize_t synth_pwritev(FsContext *ctx, V9fsFidOpenState *fs, |
9db221ae AK |
295 | const struct iovec *iov, |
296 | int iovcnt, off_t offset) | |
297 | { | |
298 | int i, count = 0, wcount; | |
299 | V9fsSynthOpenState *synth_open = fs->private; | |
300 | V9fsSynthNode *node = synth_open->node; | |
301 | if (!node->attr->write) { | |
302 | errno = EPERM; | |
303 | return -1; | |
304 | } | |
305 | for (i = 0; i < iovcnt; i++) { | |
306 | wcount = node->attr->write(iov[i].iov_base, iov[i].iov_len, | |
307 | offset, node->private); | |
308 | offset += wcount; | |
309 | count += wcount; | |
310 | /* If we wrote less than requested. we are done */ | |
311 | if (wcount < iov[i].iov_len) { | |
312 | break; | |
313 | } | |
314 | } | |
315 | return count; | |
316 | } | |
317 | ||
b05528b5 | 318 | static ssize_t synth_preadv(FsContext *ctx, V9fsFidOpenState *fs, |
9db221ae AK |
319 | const struct iovec *iov, |
320 | int iovcnt, off_t offset) | |
321 | { | |
322 | int i, count = 0, rcount; | |
323 | V9fsSynthOpenState *synth_open = fs->private; | |
324 | V9fsSynthNode *node = synth_open->node; | |
325 | if (!node->attr->read) { | |
326 | errno = EPERM; | |
327 | return -1; | |
328 | } | |
329 | for (i = 0; i < iovcnt; i++) { | |
330 | rcount = node->attr->read(iov[i].iov_base, iov[i].iov_len, | |
331 | offset, node->private); | |
332 | offset += rcount; | |
333 | count += rcount; | |
334 | /* If we read less than requested. we are done */ | |
335 | if (rcount < iov[i].iov_len) { | |
336 | break; | |
337 | } | |
338 | } | |
339 | return count; | |
340 | } | |
341 | ||
b05528b5 | 342 | static int synth_truncate(FsContext *ctx, V9fsPath *path, off_t offset) |
9db221ae AK |
343 | { |
344 | errno = ENOSYS; | |
345 | return -1; | |
346 | } | |
347 | ||
b05528b5 | 348 | static int synth_chmod(FsContext *fs_ctx, V9fsPath *path, FsCred *credp) |
9db221ae AK |
349 | { |
350 | errno = EPERM; | |
351 | return -1; | |
352 | } | |
353 | ||
b05528b5 | 354 | static int synth_mknod(FsContext *fs_ctx, V9fsPath *path, |
9db221ae AK |
355 | const char *buf, FsCred *credp) |
356 | { | |
357 | errno = EPERM; | |
358 | return -1; | |
359 | } | |
360 | ||
b05528b5 | 361 | static int synth_mkdir(FsContext *fs_ctx, V9fsPath *path, |
9db221ae AK |
362 | const char *buf, FsCred *credp) |
363 | { | |
364 | errno = EPERM; | |
365 | return -1; | |
366 | } | |
367 | ||
b05528b5 | 368 | static ssize_t synth_readlink(FsContext *fs_ctx, V9fsPath *path, |
9db221ae AK |
369 | char *buf, size_t bufsz) |
370 | { | |
371 | errno = ENOSYS; | |
372 | return -1; | |
373 | } | |
374 | ||
b05528b5 | 375 | static int synth_symlink(FsContext *fs_ctx, const char *oldpath, |
9db221ae AK |
376 | V9fsPath *newpath, const char *buf, FsCred *credp) |
377 | { | |
378 | errno = EPERM; | |
379 | return -1; | |
380 | } | |
381 | ||
b05528b5 | 382 | static int synth_link(FsContext *fs_ctx, V9fsPath *oldpath, |
9db221ae AK |
383 | V9fsPath *newpath, const char *buf) |
384 | { | |
385 | errno = EPERM; | |
386 | return -1; | |
387 | } | |
388 | ||
b05528b5 | 389 | static int synth_rename(FsContext *ctx, const char *oldpath, |
9db221ae AK |
390 | const char *newpath) |
391 | { | |
392 | errno = EPERM; | |
393 | return -1; | |
394 | } | |
395 | ||
b05528b5 | 396 | static int synth_chown(FsContext *fs_ctx, V9fsPath *path, FsCred *credp) |
9db221ae AK |
397 | { |
398 | errno = EPERM; | |
399 | return -1; | |
400 | } | |
401 | ||
b05528b5 | 402 | static int synth_utimensat(FsContext *fs_ctx, V9fsPath *path, |
9db221ae AK |
403 | const struct timespec *buf) |
404 | { | |
405 | errno = EPERM; | |
406 | return 0; | |
407 | } | |
408 | ||
b05528b5 | 409 | static int synth_remove(FsContext *ctx, const char *path) |
9db221ae AK |
410 | { |
411 | errno = EPERM; | |
412 | return -1; | |
413 | } | |
414 | ||
b05528b5 | 415 | static int synth_fsync(FsContext *ctx, int fid_type, |
8b888272 | 416 | V9fsFidOpenState *fs, int datasync) |
9db221ae AK |
417 | { |
418 | errno = ENOSYS; | |
419 | return 0; | |
420 | } | |
421 | ||
b05528b5 | 422 | static int synth_statfs(FsContext *s, V9fsPath *fs_path, |
9db221ae AK |
423 | struct statfs *stbuf) |
424 | { | |
425 | stbuf->f_type = 0xABCD; | |
426 | stbuf->f_bsize = 512; | |
427 | stbuf->f_blocks = 0; | |
b05528b5 | 428 | stbuf->f_files = synth_node_count; |
9db221ae AK |
429 | stbuf->f_namelen = NAME_MAX; |
430 | return 0; | |
431 | } | |
432 | ||
b05528b5 | 433 | static ssize_t synth_lgetxattr(FsContext *ctx, V9fsPath *path, |
9db221ae AK |
434 | const char *name, void *value, size_t size) |
435 | { | |
436 | errno = ENOTSUP; | |
437 | return -1; | |
438 | } | |
439 | ||
b05528b5 | 440 | static ssize_t synth_llistxattr(FsContext *ctx, V9fsPath *path, |
9db221ae AK |
441 | void *value, size_t size) |
442 | { | |
443 | errno = ENOTSUP; | |
444 | return -1; | |
445 | } | |
446 | ||
b05528b5 | 447 | static int synth_lsetxattr(FsContext *ctx, V9fsPath *path, |
9db221ae AK |
448 | const char *name, void *value, |
449 | size_t size, int flags) | |
450 | { | |
451 | errno = ENOTSUP; | |
452 | return -1; | |
453 | } | |
454 | ||
b05528b5 | 455 | static int synth_lremovexattr(FsContext *ctx, |
9db221ae AK |
456 | V9fsPath *path, const char *name) |
457 | { | |
458 | errno = ENOTSUP; | |
459 | return -1; | |
460 | } | |
461 | ||
b05528b5 | 462 | static int synth_name_to_path(FsContext *ctx, V9fsPath *dir_path, |
9db221ae AK |
463 | const char *name, V9fsPath *target) |
464 | { | |
465 | V9fsSynthNode *node; | |
466 | V9fsSynthNode *dir_node; | |
467 | ||
468 | /* "." and ".." are not allowed */ | |
469 | if (!strcmp(name, ".") || !strcmp(name, "..")) { | |
470 | errno = EINVAL; | |
471 | return -1; | |
472 | ||
473 | } | |
474 | if (!dir_path) { | |
b05528b5 | 475 | dir_node = &synth_root; |
9db221ae AK |
476 | } else { |
477 | dir_node = *(V9fsSynthNode **)dir_path->data; | |
478 | } | |
479 | if (!strcmp(name, "/")) { | |
480 | node = dir_node; | |
481 | goto out; | |
482 | } | |
483 | /* search for the name in the childern */ | |
2583e443 | 484 | rcu_read_lock(); |
9db221ae AK |
485 | QLIST_FOREACH(node, &dir_node->child, sibling) { |
486 | if (!strcmp(node->name, name)) { | |
487 | break; | |
488 | } | |
489 | } | |
2583e443 HPB |
490 | rcu_read_unlock(); |
491 | ||
9db221ae AK |
492 | if (!node) { |
493 | errno = ENOENT; | |
494 | return -1; | |
495 | } | |
496 | out: | |
497 | /* Copy the node pointer to fid */ | |
453a1b23 | 498 | target->data = g_memdup(&node, sizeof(void *)); |
9db221ae AK |
499 | target->size = sizeof(void *); |
500 | return 0; | |
501 | } | |
502 | ||
b05528b5 | 503 | static int synth_renameat(FsContext *ctx, V9fsPath *olddir, |
9db221ae AK |
504 | const char *old_name, V9fsPath *newdir, |
505 | const char *new_name) | |
506 | { | |
507 | errno = EPERM; | |
508 | return -1; | |
509 | } | |
510 | ||
b05528b5 | 511 | static int synth_unlinkat(FsContext *ctx, V9fsPath *dir, |
9db221ae AK |
512 | const char *name, int flags) |
513 | { | |
514 | errno = EPERM; | |
515 | return -1; | |
516 | } | |
517 | ||
65603a80 | 518 | static int synth_init(FsContext *ctx, Error **errp) |
9db221ae | 519 | { |
b05528b5 GK |
520 | QLIST_INIT(&synth_root.child); |
521 | qemu_mutex_init(&synth_mutex); | |
9db221ae AK |
522 | |
523 | /* Add "." and ".." entries for root */ | |
b05528b5 GK |
524 | v9fs_add_dir_node(&synth_root, synth_root.attr->mode, |
525 | "..", synth_root.attr, synth_root.attr->inode); | |
526 | v9fs_add_dir_node(&synth_root, synth_root.attr->mode, | |
527 | ".", synth_root.attr, synth_root.attr->inode); | |
9db221ae AK |
528 | |
529 | /* Mark the subsystem is ready for use */ | |
b05528b5 | 530 | synth_fs = 1; |
2893ddd5 GK |
531 | |
532 | if (qtest_enabled()) { | |
533 | V9fsSynthNode *node = NULL; | |
534 | int i, ret; | |
535 | ||
536 | /* Directory hierarchy for WALK test */ | |
537 | for (i = 0; i < P9_MAXWELEM; i++) { | |
538 | char *name = g_strdup_printf(QTEST_V9FS_SYNTH_WALK_FILE, i); | |
539 | ||
540 | ret = qemu_v9fs_synth_mkdir(node, 0700, name, &node); | |
541 | assert(!ret); | |
542 | g_free(name); | |
543 | } | |
82469aae GK |
544 | |
545 | /* File for LOPEN test */ | |
546 | ret = qemu_v9fs_synth_add_file(NULL, 0, QTEST_V9FS_SYNTH_LOPEN_FILE, | |
547 | NULL, NULL, ctx); | |
548 | assert(!ret); | |
2893ddd5 GK |
549 | } |
550 | ||
9db221ae AK |
551 | return 0; |
552 | } | |
553 | ||
554 | FileOperations synth_ops = { | |
b05528b5 GK |
555 | .init = synth_init, |
556 | .lstat = synth_lstat, | |
557 | .readlink = synth_readlink, | |
558 | .close = synth_close, | |
559 | .closedir = synth_closedir, | |
560 | .open = synth_open, | |
561 | .opendir = synth_opendir, | |
562 | .rewinddir = synth_rewinddir, | |
563 | .telldir = synth_telldir, | |
564 | .readdir = synth_readdir, | |
565 | .seekdir = synth_seekdir, | |
566 | .preadv = synth_preadv, | |
567 | .pwritev = synth_pwritev, | |
568 | .chmod = synth_chmod, | |
569 | .mknod = synth_mknod, | |
570 | .mkdir = synth_mkdir, | |
571 | .fstat = synth_fstat, | |
572 | .open2 = synth_open2, | |
573 | .symlink = synth_symlink, | |
574 | .link = synth_link, | |
575 | .truncate = synth_truncate, | |
576 | .rename = synth_rename, | |
577 | .chown = synth_chown, | |
578 | .utimensat = synth_utimensat, | |
579 | .remove = synth_remove, | |
580 | .fsync = synth_fsync, | |
581 | .statfs = synth_statfs, | |
582 | .lgetxattr = synth_lgetxattr, | |
583 | .llistxattr = synth_llistxattr, | |
584 | .lsetxattr = synth_lsetxattr, | |
585 | .lremovexattr = synth_lremovexattr, | |
586 | .name_to_path = synth_name_to_path, | |
587 | .renameat = synth_renameat, | |
588 | .unlinkat = synth_unlinkat, | |
9db221ae | 589 | }; |