Changes in uspace/app/bdsh/cmds/modules/mkfile/mkfile.c [bc41f3a3:1558d85] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
rbc41f3a3 r1558d85 165 165 const char byte = 0x00; 166 166 167 if ((rc2 = lseek(fd, file_size - 1, SEEK_SET)) < 0) { 168 close(fd); 167 if ((rc2 = lseek(fd, file_size - 1, SEEK_SET)) < 0) 169 168 goto error; 170 }171 169 172 170 rc2 = write(fd, &byte, sizeof(char)); 173 if (rc2 < 0) { 174 close(fd); 171 if (rc2 < 0) 175 172 goto error; 176 }177 173 return CMD_SUCCESS; 178 174 } … … 191 187 printf("%s: Error writing file (%d).\n", cmdname, errno); 192 188 close(fd); 193 free(buffer);194 189 return CMD_FAILURE; 195 190 }
Note:
See TracChangeset
for help on using the changeset viewer.