| 211 | |
| 212 | |
| 213 | static int fs_mkdir(FSDevice *fs, FSQID *qid, FSFile *f, |
| 214 | const char *name, uint32_t mode, uint32_t gid) |
| 215 | { |
| 216 | char *path; |
| 217 | struct stat st; |
| 218 | |
| 219 | path = compose_path(f->path, name); |
| 220 | if (mkdir(path, mode) < 0) { |
| 221 | free(path); |
| 222 | return -errno_to_p9(errno); |
| 223 | } |
| 224 | if (lstat(path, &st) != 0) { |
| 225 | free(path); |
| 226 | return -errno_to_p9(errno); |
| 227 | } |
| 228 | free(path); |
| 229 | stat_to_qid(qid, &st); |
| 230 | return 0; |
| 231 | } |
| 232 | |
| 233 | static int fs_open(FSDevice *fs, FSQID *qid, FSFile *f, uint32_t flags, |
| 234 | FSOpenCompletionFunc *cb, void *opaque) |
nothing calls this directly
no test coverage detected