Changeset c47e1a8 in mainline for uspace/lib/c/generic/device/char.c


Ignore:
Timestamp:
2010-05-21T07:50:04Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d51ee2b
Parents:
cf8cc36 (diff), 15b592b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes (rev. 451)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/char.c

    rcf8cc36 rc47e1a8  
    6060       
    6161        aid_t req;
    62         int rc;
     62        int ret;
    6363       
    6464        if (read) {
    6565                req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE), CHAR_READ_DEV, &answer);
    66                 rc = async_data_read_start(dev_phone, buf, len);               
     66                ret = async_data_read_start(dev_phone, buf, len);               
    6767        } else {
    6868                req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE), CHAR_WRITE_DEV, &answer);
    69                 rc = async_data_write_start(dev_phone, buf, len);
     69                ret = async_data_write_start(dev_phone, buf, len);
    7070        }
    7171       
    72         if (rc != EOK) {
    73                 ipcarg_t rc_orig;
    74                 async_wait_for(req, &rc_orig);
     72        ipcarg_t rc;
     73        if (ret != EOK) {               
     74                async_wait_for(req, &rc);
    7575                async_serialize_end();
    76                 if (rc_orig == EOK) {
    77                         return rc;
     76                if (rc == EOK) {
     77                        return ret;
    7878                }
    7979                else {
    80                         return (int) rc_orig;
     80                        return (int) rc;
    8181                }
    8282        }
     
    8585        async_serialize_end();
    8686       
    87         if (EOK != rc) {
    88                 return rc;
     87        ret = (int)rc;
     88        if (EOK != ret) {
     89                return ret;
    8990        }
    9091       
Note: See TracChangeset for help on using the changeset viewer.