Skip to content

SYS_write

Man Page

x86_64 ARM64 RV64

Writes up to count bytes from the buffer starting at buf to the file referred to by the file descriptor fd.

Signature

(import "wali" "SYS_write" (func (param $fd i32) (param $buf i32) (param $count i32) (result i64)))
long write(int fd, void* buf, size_t count);

Notes

  • On success, returns the number of bytes written
  • On error, returns -1 and sets errno appropriately
  • A successful return does not guarantee the data has been committed to disk