Changes in uspace/app/bdsh/cmds/modules/rm/rm.c [86cf96d:6afc9d7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/rm/rm.c
r86cf96d r6afc9d7 27 27 */ 28 28 29 #include <errno.h> 29 30 #include <stdio.h> 30 31 #include <stdlib.h> … … 131 132 static unsigned int rm_single(const char *path) 132 133 { 133 if (unlink(path) ) {134 if (unlink(path) != 0) { 134 135 cli_error(CL_EFAIL, "rm: could not remove file %s", path); 135 136 return 1; … … 150 151 151 152 fd = open(path, O_RDONLY); 152 if (fd > 0) {153 if (fd >= 0) { 153 154 close(fd); 154 155 return RM_FILE; … … 210 211 rc = rmdir(path); 211 212 if (rc == 0) 212 return ret;213 return errno; 213 214 214 215 cli_error(CL_ENOTSUP, "Can not remove %s", path);
Note:
See TracChangeset
for help on using the changeset viewer.