Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5d50c419 in mainline for uspace/lib/c/include/io/chardev.h


Ignore:
Timestamp:
2017-11-19T21:14:19Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
c657bd7
Parents:
75fcf9b
Message:

Chardev API should separate error code from number of bytes transferred. This is cleaner, allows the code to be more independent of Exxx sign and allows for partial success (some bytes successfully transferred and then an error occurred.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/io/chardev.h

    r75fcf9b r5d50c419  
    3535
    3636#include <async.h>
    37 #include <types/common.h>
     37#include <stddef.h>
    3838
    3939typedef struct {
     
    4343extern int chardev_open(async_sess_t *, chardev_t **);
    4444extern void chardev_close(chardev_t *);
    45 extern ssize_t chardev_read(chardev_t *, void *, size_t);
    46 extern ssize_t chardev_write(chardev_t *, const void *, size_t);
     45extern int chardev_read(chardev_t *, void *, size_t, size_t *);
     46extern int chardev_write(chardev_t *, const void *, size_t, size_t *);
    4747
    4848#endif
Note: See TracChangeset for help on using the changeset viewer.