Changeset bc41f3a3 in mainline
- Timestamp:
- 2016-04-25T08:14:01Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6f2c1ff
- Parents:
- 38ad239
- git-author:
- Manuele Conti <conti.manuele@…> (2016-04-25 08:14:01)
- git-committer:
- Jakub Jermar <jakub@…> (2016-04-25 08:14:01)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
r38ad239 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.