Changeset 48d4231 in mainline for uspace/app/bdsh/cmds/modules/cp/cp.c


Ignore:
Timestamp:
2011-03-30T19:44:49Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ecb107b
Parents:
f62468c (diff), 27bdfa5 (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 development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    rf62468c r48d4231  
    108108        for (;;) {
    109109                ssize_t res;
     110                size_t written = 0;
    110111
    111112                bytes = read(fd1, buff, blen);
     
    120121                         * returned less data than requested.
    121122                         */
    122                         bytes = write(fd2, buff, res);
     123                        bytes = write(fd2, buff + written, res);
    123124                        if (bytes < 0)
    124125                                goto err;
     126                        written += bytes;
    125127                        res -= bytes;
    126128                } while (res > 0);
Note: See TracChangeset for help on using the changeset viewer.