Changeset ff381a7 in mainline for uspace/app/bdsh/cmds/modules/rm/rm.c


Ignore:
Timestamp:
2015-11-02T20:54:19Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8513177
Parents:
3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r3feeab2 rff381a7  
    2727 */
    2828
     29#include <errno.h>
    2930#include <stdio.h>
    3031#include <stdlib.h>
     
    131132static unsigned int rm_single(const char *path)
    132133{
    133         if (unlink(path)) {
     134        if (unlink(path) != 0) {
    134135                cli_error(CL_EFAIL, "rm: could not remove file %s", path);
    135136                return 1;
     
    150151
    151152        fd = open(path, O_RDONLY);
    152         if (fd > 0) {
     153        if (fd >= 0) {
    153154                close(fd);
    154155                return RM_FILE;
     
    210211        rc = rmdir(path);
    211212        if (rc == 0)
    212                 return ret;
     213                return errno;
    213214
    214215        cli_error(CL_ENOTSUP, "Can not remove %s", path);
Note: See TracChangeset for help on using the changeset viewer.