Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 39b54fe in mainline


Ignore:
Timestamp:
2017-12-21T18:00:18Z (4 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
f04b5b3
Parents:
d5c1051
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-21 17:45:20)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-21 18:00:18)
Message:

Fix error handling problem in mkfile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/mkfile/mkfile.c

    rd5c1051 r39b54fe  
    192192                rc = vfs_write(fd, &pos, buffer, to_write, &nwritten);
    193193                if (rc != EOK) {
    194                         printf("%s: Error writing file (%s).\n", cmdname, str_error(errno));
     194                        printf("%s: Error writing file (%s).\n", cmdname, str_error(rc));
    195195                        vfs_put(fd);
    196196                        free(buffer);
     
    202202        free(buffer);
    203203
    204         if (vfs_put(fd) != EOK)
     204        rc = vfs_put(fd);
     205        if (rc != EOK)
    205206                goto error;
    206207
    207208        return CMD_SUCCESS;
    208209error:
    209         printf("%s: Error writing file (%s).\n", cmdname, str_error(errno));
     210        printf("%s: Error writing file (%s).\n", cmdname, str_error(rc));
    210211        return CMD_FAILURE;
    211212}
Note: See TracChangeset for help on using the changeset viewer.