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