MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / fs_write

Function fs_write

tinyemu/fs_disk.c:363–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363static int fs_write(FSDevice *fs, FSFile *f, uint64_t offset,
364 const uint8_t *buf, int count)
365{
366 int ret;
367
368 if (!f->is_opened || f->is_dir)
369 return -P9_EPROTO;
370 ret = pwrite(f->u.fd, buf, count, offset);
371 if (ret < 0)
372 return -errno_to_p9(errno);
373 else
374 return ret;
375}
376
377static void fs_close(FSDevice *fs, FSFile *f)
378{

Callers

nothing calls this directly

Calls 1

errno_to_p9Function · 0.85

Tested by

no test coverage detected