Changeset b7fd2a0 in mainline for uspace/app/bdsh/cmds
- Timestamp:
- 2018-01-13T03:10:29Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/app/bdsh/cmds
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/builtins/batch/batch.c
r36f0738 rb7fd2a0 85 85 } 86 86 87 int rc = EOK;87 errno_t rc = EOK; 88 88 FILE *batch = fopen(argv[1], "r"); 89 89 if (batch == NULL) { -
uspace/app/bdsh/cmds/builtins/cd/cd.c
r36f0738 rb7fd2a0 51 51 static bool previous_directory_set = false; 52 52 53 static int chdir_and_remember(const char *new_dir)53 static errno_t chdir_and_remember(const char *new_dir) 54 54 { 55 55 56 int rc = vfs_cwd_get(previous_directory_tmp, PATH_MAX);56 errno_t rc = vfs_cwd_get(previous_directory_tmp, PATH_MAX); 57 57 previous_directory_valid = (rc == EOK); 58 58 previous_directory_set = true; … … 86 86 { 87 87 int argc; 88 int rc = EOK;88 errno_t rc = EOK; 89 89 90 90 argc = cli_count_args(argv); -
uspace/app/bdsh/cmds/modules/cat/cat.c
r36f0738 rb7fd2a0 187 187 off64_t file_size = 0, length = 0; 188 188 aoff64_t pos = 0; 189 int rc;189 errno_t rc; 190 190 191 191 bool reading_stdin = dash_represents_stdin && (str_cmp(fname, "-") == 0); … … 196 196 blen = STR_BOUNDS(1); 197 197 } else { 198 int rc = vfs_lookup_open(fname, WALK_REGULAR, MODE_READ, &fd);198 errno_t rc = vfs_lookup_open(fname, WALK_REGULAR, MODE_READ, &fd); 199 199 if (rc != EOK) { 200 200 fd = -1; … … 316 316 bool tailFirst = false; 317 317 sysarg_t rows, cols; 318 int rc;318 errno_t rc; 319 319 320 320 /* -
uspace/app/bdsh/cmds/modules/cmp/cmp.c
r36f0738 rb7fd2a0 70 70 } 71 71 72 static int cmp_files(const char *fn0, const char *fn1)72 static errno_t cmp_files(const char *fn0, const char *fn1) 73 73 { 74 int rc = EOK;74 errno_t rc = EOK; 75 75 const char *fn[2] = {fn0, fn1}; 76 76 int fd[2] = {-1, -1}; … … 117 117 int cmd_cmp(char **argv) 118 118 { 119 int rc;119 errno_t rc; 120 120 unsigned int argc; 121 121 int c, opt_ind; -
uspace/app/bdsh/cmds/modules/cp/cp.c
r36f0738 rb7fd2a0 82 82 struct stat s; 83 83 84 int r = vfs_stat_path(path, &s);84 errno_t r = vfs_stat_path(path, &s); 85 85 86 86 if (r != EOK) … … 176 176 } 177 177 178 static int do_copy(const char *src, const char *dest,178 static errno_t do_copy(const char *src, const char *dest, 179 179 size_t blen, int vb, int recursive, int force, int interactive) 180 180 { 181 int rc = EOK;181 errno_t rc = EOK; 182 182 char dest_path[PATH_MAX]; 183 183 char src_path[PATH_MAX]; … … 388 388 int fd1, fd2; 389 389 size_t rbytes, wbytes; 390 int rc;390 errno_t rc; 391 391 off64_t total; 392 392 char *buff = NULL; … … 479 479 int force = 0, interactive = 0; 480 480 int c, opt_ind; 481 int ret;481 errno_t ret; 482 482 483 483 con = console_init(stdin, stdout); -
uspace/app/bdsh/cmds/modules/ls/ls.c
r36f0738 rb7fd2a0 135 135 int i; 136 136 int nbdirs = 0; 137 int rc;137 errno_t rc; 138 138 int len; 139 139 char *buff; -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
r36f0738 rb7fd2a0 94 94 95 95 int ret = 0; 96 int rc;96 errno_t rc; 97 97 98 98 if (!create_parents) { -
uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
r36f0738 rb7fd2a0 89 89 * @return EOK on success or an error code 90 90 */ 91 static int read_size(const char *str, size_t *rsize)91 static errno_t read_size(const char *str, size_t *rsize) 92 92 { 93 93 size_t number, unit; … … 123 123 size_t to_write; 124 124 size_t nwritten; 125 int rc;125 errno_t rc; 126 126 char *file_name; 127 127 void *buffer; -
uspace/app/bdsh/cmds/modules/mount/mount.c
r36f0738 rb7fd2a0 78 78 mtab_ent_t *old_ent = NULL; 79 79 char *svc_name; 80 int rc;80 errno_t rc; 81 81 82 82 vfs_get_mtab_list(&mtab_list); … … 109 109 static void print_fstypes(void) 110 110 { 111 int rc;111 errno_t rc; 112 112 vfs_fstypes_t fstypes; 113 113 char **p; … … 132 132 const char *mopts = ""; 133 133 const char *dev = ""; 134 int rc;134 errno_t rc; 135 135 int c, opt_ind; 136 136 unsigned int instance = 0; -
uspace/app/bdsh/cmds/modules/mv/mv.c
r36f0738 rb7fd2a0 52 52 { 53 53 unsigned int argc; 54 int rc;54 errno_t rc; 55 55 56 56 argc = cli_count_args(argv); -
uspace/app/bdsh/cmds/modules/rm/rm.c
r36f0738 rb7fd2a0 195 195 static unsigned int rm_recursive(const char *path) 196 196 { 197 int rc;197 errno_t rc; 198 198 unsigned int ret = 0; 199 199 -
uspace/app/bdsh/cmds/modules/sleep/sleep.c
r36f0738 rb7fd2a0 62 62 * @return EOK if conversion was successful. 63 63 */ 64 static int decimal_to_useconds(const char *nptr, useconds_t *result)64 static errno_t decimal_to_useconds(const char *nptr, useconds_t *result) 65 65 { 66 int ret;66 errno_t ret; 67 67 uint64_t whole_seconds; 68 68 uint64_t frac_seconds; … … 112 112 int cmd_sleep(char **argv) 113 113 { 114 int ret;114 errno_t ret; 115 115 unsigned int argc; 116 116 useconds_t duration = 0; -
uspace/app/bdsh/cmds/modules/touch/touch.c
r36f0738 rb7fd2a0 123 123 if ((!no_create) || 124 124 ((no_create) && (vfs_stat_path(buff, &file_stat) == EOK))) { 125 int rc = vfs_lookup(buff, WALK_REGULAR | WALK_MAY_CREATE, &fd);125 errno_t rc = vfs_lookup(buff, WALK_REGULAR | WALK_MAY_CREATE, &fd); 126 126 if (rc != EOK) { 127 127 fd = -1; -
uspace/app/bdsh/cmds/modules/unmount/unmount.c
r36f0738 rb7fd2a0 57 57 { 58 58 unsigned int argc; 59 int rc;59 errno_t rc; 60 60 61 61 argc = cli_count_args(argv);
Note:
See TracChangeset
for help on using the changeset viewer.