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

Changeset 677cad5 in mainline for uspace/drv/char/pl050/pl050.c


Ignore:
Timestamp:
2017-11-20T20:29:03Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
b2f542a
Parents:
19ea61d
Message:

Chardev server-side error reporting should match client side.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/pl050/pl050.c

    r19ea61d r677cad5  
    5454static int pl050_fun_offline(ddf_fun_t *);
    5555static void pl050_char_conn(ipc_callid_t, ipc_call_t *, void *);
    56 static int pl050_read(chardev_srv_t *, void *, size_t);
    57 static int pl050_write(chardev_srv_t *, const void *, size_t);
     56static int pl050_read(chardev_srv_t *, void *, size_t, size_t *);
     57static int pl050_write(chardev_srv_t *, const void *, size_t, size_t *);
    5858
    5959static driver_ops_t driver_ops = {
     
    236236}
    237237
    238 static int pl050_read(chardev_srv_t *srv, void *buffer, size_t size)
     238static int pl050_read(chardev_srv_t *srv, void *buffer, size_t size,
     239    size_t *nread)
    239240{
    240241        pl050_t *pl050 = (pl050_t *)srv->srvs->sarg;
     
    257258        fibril_mutex_unlock(&pl050->buf_lock);
    258259
    259         return size - left;
    260 }
    261 
    262 static int pl050_write(chardev_srv_t *srv, const void *data, size_t size)
     260        *nread = size - left;
     261        return EOK;
     262}
     263
     264static int pl050_write(chardev_srv_t *srv, const void *data, size_t size,
     265    size_t *nwritten)
    263266{
    264267        pl050_t *pl050 = (pl050_t *)srv->srvs->sarg;
     
    278281        ddf_msg(LVL_NOTE, "%s/pl050_write() success", pl050->name);
    279282
    280         return size;
     283        *nwritten = size;
     284        return EOK;
    281285}
    282286
Note: See TracChangeset for help on using the changeset viewer.