Changeset ce04ea44 in mainline for uspace/app/bdsh/cmds
- Timestamp:
- 2017-04-02T12:27:14Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4067a7
- Parents:
- 163fc09
- Location:
- uspace/app/bdsh/cmds/modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
r163fc09 rce04ea44 251 251 } 252 252 253 bytes = read(fd, &pos, buff + copied_bytes, bytes_to_read);253 bytes = vfs_read(fd, &pos, buff + copied_bytes, bytes_to_read); 254 254 copied_bytes = 0; 255 255 -
uspace/app/bdsh/cmds/modules/cmp/cmp.c
r163fc09 rce04ea44 94 94 ssize_t size; 95 95 do { 96 size = read(fd[i], &pos[i],96 size = vfs_read(fd[i], &pos[i], 97 97 buffer[i] + offset[i], 98 98 CMP_BUFLEN - offset[i]); 99 99 if (size < 0) { 100 rc = errno;100 rc = size; 101 101 printf("Error reading from %s\n", 102 102 fn[i]); -
uspace/app/bdsh/cmds/modules/cp/cp.c
r163fc09 rce04ea44 413 413 } 414 414 415 while ((bytes = read(fd1, &posr, buff, blen)) > 0) {416 if ((bytes = write(fd2, &posw, buff, bytes)) < 0)415 while ((bytes = vfs_read(fd1, &posr, buff, blen)) > 0) { 416 if ((bytes = vfs_write(fd2, &posw, buff, bytes)) < 0) 417 417 break; 418 418 copied += bytes; … … 420 420 421 421 if (bytes < 0) { 422 printf("\nError copying %s, (%d)\n", src, errno);422 printf("\nError copying %s, (%d)\n", src, bytes); 423 423 copied = bytes; 424 424 } -
uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
r163fc09 rce04ea44 166 166 167 167 pos = file_size - 1; 168 rc2 = write(fd, &pos, &byte, sizeof(char));168 rc2 = vfs_write(fd, &pos, &byte, sizeof(char)); 169 169 if (rc2 < 0) { 170 170 vfs_put(fd); … … 183 183 while (total_written < file_size) { 184 184 to_write = min(file_size - total_written, BUFFER_SIZE); 185 rc = write(fd, &pos, buffer, to_write);185 rc = vfs_write(fd, &pos, buffer, to_write); 186 186 if (rc <= 0) { 187 187 printf("%s: Error writing file (%d).\n", cmdname, errno);
Note:
See TracChangeset
for help on using the changeset viewer.