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


Ignore:
Timestamp:
2017-03-30T20:47:53Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67e881c
Parents:
ae7bfbbd
Message:

Rename unlink() to vfs_unlink_path() and _vfs_unlink() to vfs_unlink()

  • Also, remove rmdir()
File:
1 edited

Legend:

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

    rae7bfbbd r79ea5af  
    3636#include <mem.h>
    3737#include <str.h>
     38#include <vfs/vfs.h>
    3839
    3940#include "config.h"
     
    132133static unsigned int rm_single(const char *path)
    133134{
    134         if (unlink(path) != 0) {
     135        if (vfs_unlink_path(path) != EOK) {
    135136                cli_error(CL_EFAIL, "rm: could not remove file %s", path);
    136137                return 1;
     
    201202
    202203        /* First see if it will just go away */
    203         rc = rmdir(path);
    204         if (rc == 0)
     204        rc = vfs_unlink_path(path);
     205        if (rc == EOK)
    205206                return 0;
    206207
     
    209210
    210211        /* Delete directory */
    211         rc = rmdir(path);
    212         if (rc == 0)
    213                 return errno;
     212        rc = vfs_unlink_path(path);
     213        if (rc == EOK)
     214                return EOK;
    214215
    215216        cli_error(CL_ENOTSUP, "Can not remove %s", path);
Note: See TracChangeset for help on using the changeset viewer.