Skip to content

SYS_read

Man Page

x86_64 ARM64 RV64

Attempts to read up to count bytes from file descriptor fd into the buffer starting at buf.

Signature

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

Notes

  • On success, returns the number of bytes read (zero indicates end of file)
  • On error, returns -1 and sets errno appropriately
  • The file position is advanced by the number of bytes read