Changeset 79ea5af in mainline for uspace/app/bdsh/cmds
- Timestamp:
- 2017-03-30T20:47:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67e881c
- Parents:
- ae7bfbbd
- Location:
- uspace/app/bdsh/cmds/modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cp/cp.c
rae7bfbbd r79ea5af 236 236 */ 237 237 if (force && !interactive) { 238 if ( unlink(dest_path) != 0) {238 if (vfs_unlink_path(dest_path) != EOK) { 239 239 printf("Unable to remove %s\n", 240 240 dest_path); … … 247 247 if (overwrite) { 248 248 printf("Overwriting file: %s\n", dest_path); 249 if ( unlink(dest_path) != 0) {249 if (vfs_unlink_path(dest_path) != EOK) { 250 250 printf("Unable to remove %s\n", dest_path); 251 251 goto exit; -
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.