Changeset 79ea5af in mainline for uspace/app/bdsh/cmds/modules/rm/rm.c
- Timestamp:
- 2017-03-30T20:47:53Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67e881c
- Parents:
- ae7bfbbd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/rm/rm.c
rae7bfbbd r79ea5af 36 36 #include <mem.h> 37 37 #include <str.h> 38 #include <vfs/vfs.h> 38 39 39 40 #include "config.h" … … 132 133 static unsigned int rm_single(const char *path) 133 134 { 134 if ( unlink(path) != 0) {135 if (vfs_unlink_path(path) != EOK) { 135 136 cli_error(CL_EFAIL, "rm: could not remove file %s", path); 136 137 return 1; … … 201 202 202 203 /* 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) 205 206 return 0; 206 207 … … 209 210 210 211 /* 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; 214 215 215 216 cli_error(CL_ENOTSUP, "Can not remove %s", path);
Note:
See TracChangeset
for help on using the changeset viewer.