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