Changes in uspace/app/bdsh/cmds/modules/cp/cp.c [2815505:19f857a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cp/cp.c
r2815505 r19f857a 95 95 96 96 if (vb) 97 printf("% " PRIu64 "bytes to copy\n", total);97 printf("%d bytes to copy\n", total); 98 98 99 99 lseek(fd1, 0, SEEK_SET); … … 108 108 for (;;) { 109 109 ssize_t res; 110 size_t written = 0;111 110 112 111 bytes = read(fd1, buff, blen); … … 121 120 * returned less data than requested. 122 121 */ 123 bytes = write(fd2, buff + written, res);122 bytes = write(fd2, buff, res); 124 123 if (bytes < 0) 125 124 goto err; 126 written += bytes;127 125 res -= bytes; 128 126 } while (res > 0); … … 132 130 */ 133 131 if (res != 0) { 134 printf("\n% zd more bytes than actually exist were copied\n", res);132 printf("\n%d more bytes than actually exist were copied\n", res); 135 133 goto err; 136 134 } … … 189 187 return CMD_SUCCESS; 190 188 case 'v': 191 printf("% s\n", CP_VERSION);189 printf("%d\n", CP_VERSION); 192 190 return CMD_SUCCESS; 193 191 case 'V': … … 225 223 226 224 if (verbose) 227 printf("% " PRId64 "bytes copied\n", ret);225 printf("%d bytes copied\n", ret); 228 226 229 227 if (ret >= 0)
Note:
See TracChangeset
for help on using the changeset viewer.