Changeset 368ee04 in mainline for uspace/app/bdsh
- Timestamp:
- 2017-04-05T18:10:39Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93ad8166
- Parents:
- 39f892a9 (diff), 2166728 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/app/bdsh
- Files:
-
- 17 edited
-
cmds/builtins/cd/cd.c (modified) (2 diffs)
-
cmds/modules/cat/cat.c (modified) (7 diffs)
-
cmds/modules/cmp/cmp.c (modified) (4 diffs)
-
cmds/modules/cp/cp.c (modified) (10 diffs)
-
cmds/modules/ls/ls.c (modified) (4 diffs)
-
cmds/modules/ls/ls.h (modified) (1 diff)
-
cmds/modules/mkdir/mkdir.c (modified) (5 diffs)
-
cmds/modules/mkfile/mkfile.c (modified) (7 diffs)
-
cmds/modules/mount/mount.c (modified) (4 diffs)
-
cmds/modules/mv/mv.c (modified) (2 diffs)
-
cmds/modules/pwd/pwd.c (modified) (2 diffs)
-
cmds/modules/rm/rm.c (modified) (6 diffs)
-
cmds/modules/touch/touch.c (modified) (3 diffs)
-
cmds/modules/unmount/unmount.c (modified) (1 diff)
-
compl.c (modified) (2 diffs)
-
exec.c (modified) (4 diffs)
-
util.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/builtins/cd/cd.c
r39f892a9 r368ee04 29 29 #include <stdio.h> 30 30 #include <stdlib.h> 31 #include <unistd.h>32 31 #include <str.h> 33 32 #include <errno.h> 33 #include <vfs/vfs.h> 34 34 35 35 #include "util.h" … … 51 51 static bool previous_directory_set = false; 52 52 53 static int chdir_and_remember(const char *new_dir) { 53 static int chdir_and_remember(const char *new_dir) 54 { 54 55 55 char *ok = getcwd(previous_directory_tmp, PATH_MAX);56 previous_directory_valid = ok != NULL;56 int rc = vfs_cwd_get(previous_directory_tmp, PATH_MAX); 57 previous_directory_valid = (rc == EOK); 57 58 previous_directory_set = true; 58 59 59 if (chdir(new_dir) != 0) 60 return errno; 60 rc = vfs_cwd_set(new_dir); 61 if (rc != EOK) 62 return rc; 61 63 62 64 str_cpy(previous_directory, PATH_MAX, previous_directory_tmp); -
uspace/app/bdsh/cmds/modules/cat/cat.c
r39f892a9 r368ee04 33 33 #include <getopt.h> 34 34 #include <str.h> 35 #include <fcntl.h>36 35 #include <io/console.h> 37 36 #include <io/color.h> … … 187 186 size_t offset = 0, copied_bytes = 0; 188 187 off64_t file_size = 0, length = 0; 188 aoff64_t pos = 0; 189 189 190 190 bool reading_stdin = dash_represents_stdin && (str_cmp(fname, "-") == 0); … … 195 195 blen = STR_BOUNDS(1); 196 196 } else 197 fd = open(fname, O_RDONLY);197 fd = vfs_lookup_open(fname, WALK_REGULAR, MODE_READ); 198 198 199 199 if (fd < 0) { … … 203 203 204 204 if (NULL == (buff = (char *) malloc(blen + 1))) { 205 close(fd);205 vfs_put(fd); 206 206 printf("Unable to allocate enough memory to read %s\n", 207 fname);207 fname); 208 208 return 1; 209 209 } 210 210 211 211 if (tail != CAT_FULL_FILE) { 212 file_size = lseek(fd, 0, SEEK_END); 212 struct stat st; 213 214 if (vfs_stat(fd, &st) != EOK) { 215 vfs_put(fd); 216 free(buff); 217 printf("Unable to vfs_stat %d\n", fd); 218 return 1; 219 } 220 file_size = st.size; 213 221 if (head == CAT_FULL_FILE) { 214 222 head = file_size; … … 223 231 224 232 if (tail_first) { 225 lseek(fd, (tail >= file_size) ? 0 : (file_size - tail), SEEK_SET);233 pos = (tail >= file_size) ? 0 : (file_size - tail); 226 234 } else { 227 lseek(fd, ((head - tail) >= file_size) ? 0 : (head - tail), SEEK_SET);235 pos = ((head - tail) >= file_size) ? 0 : (head - tail); 228 236 } 229 237 } else … … 243 251 } 244 252 245 bytes = read(fd, buff + copied_bytes, bytes_to_read);253 bytes = vfs_read(fd, &pos, buff + copied_bytes, bytes_to_read); 246 254 copied_bytes = 0; 247 255 … … 279 287 } while (bytes > 0 && !should_quit && (count < length || length == CAT_FULL_FILE)); 280 288 281 close(fd);289 vfs_put(fd); 282 290 if (bytes == -1) { 283 291 printf("Error reading %s\n", fname); -
uspace/app/bdsh/cmds/modules/cmp/cmp.c
r39f892a9 r368ee04 28 28 29 29 #include <errno.h> 30 #include <fcntl.h>31 30 #include <getopt.h> 32 31 #include <mem.h> … … 79 78 char buffer[2][CMP_BUFLEN]; 80 79 ssize_t offset[2]; 80 aoff64_t pos[2] = {}; 81 81 82 82 for (int i = 0; i < 2; i++) { 83 fd[i] = open(fn[i], O_RDONLY);83 fd[i] = vfs_lookup_open(fn[i], WALK_REGULAR, MODE_READ); 84 84 if (fd[i] < 0) { 85 rc = errno;85 rc = fd[i]; 86 86 printf("Unable to open %s\n", fn[i]); 87 87 goto end; … … 94 94 ssize_t size; 95 95 do { 96 size = read(fd[i], buffer[i] + offset[i], 96 size = vfs_read(fd[i], &pos[i], 97 buffer[i] + offset[i], 97 98 CMP_BUFLEN - offset[i]); 98 99 if (size < 0) { 99 rc = errno;100 rc = size; 100 101 printf("Error reading from %s\n", 101 102 fn[i]); … … 115 116 end: 116 117 if (fd[0] >= 0) 117 close(fd[0]);118 vfs_put(fd[0]); 118 119 if (fd[1] >= 0) 119 close(fd[1]);120 vfs_put(fd[1]); 120 121 return rc; 121 122 } -
uspace/app/bdsh/cmds/modules/cp/cp.c
r39f892a9 r368ee04 35 35 #include <getopt.h> 36 36 #include <str.h> 37 #include <fcntl.h> 38 #include <sys/stat.h> 37 #include <vfs/vfs.h> 39 38 #include <dirent.h> 40 39 #include "config.h" … … 83 82 struct stat s; 84 83 85 int r = stat(path, &s);86 87 if (r != 0)84 int r = vfs_stat_path(path, &s); 85 86 if (r != EOK) 88 87 return TYPE_NONE; 89 88 else if (s.is_directory) … … 235 234 */ 236 235 if (force && !interactive) { 237 if ( unlink(dest_path) != 0) {236 if (vfs_unlink_path(dest_path) != EOK) { 238 237 printf("Unable to remove %s\n", 239 238 dest_path); … … 246 245 if (overwrite) { 247 246 printf("Overwriting file: %s\n", dest_path); 248 if ( unlink(dest_path) != 0) {247 if (vfs_unlink_path(dest_path) != EOK) { 249 248 printf("Unable to remove %s\n", dest_path); 250 249 goto exit; … … 295 294 merge_paths(dest_path, PATH_MAX, src_dirname); 296 295 297 if (mkdir(dest_path, 0) != 0) { 296 if (vfs_link_path(dest_path, KIND_DIRECTORY, 297 NULL) != EOK) { 298 298 printf("Unable to create " 299 299 "dest directory %s\n", dest_path); … … 309 309 * e.g. cp -r /src /data/new_dir_src 310 310 */ 311 if (mkdir(dest_path, 0) != 0) { 311 if (vfs_link_path(dest_path, KIND_DIRECTORY, 312 NULL) != EOK) { 312 313 printf("Unable to create " 313 314 "dest directory %s\n", dest_path); … … 341 342 342 343 /* Check if we are copying a directory into itself */ 343 stat(src_dent, &src_s);344 stat(dest_path, &dest_s);344 vfs_stat_path(src_dent, &src_s); 345 vfs_stat_path(dest_path, &dest_s); 345 346 346 347 if (dest_s.index == src_s.index && … … 377 378 int64_t copied = 0; 378 379 char *buff = NULL; 380 aoff64_t posr = 0, posw = 0; 381 struct stat st; 379 382 380 383 if (vb) 381 384 printf("Copying %s to %s\n", src, dest); 382 385 383 if (-1 == (fd1 = open(src, O_RDONLY))) { 386 fd1 = vfs_lookup_open(src, WALK_REGULAR, MODE_READ); 387 if (fd1 < 0) { 384 388 printf("Unable to open source file %s\n", src); 385 389 return -1; 386 390 } 387 391 388 if (-1 == (fd2 = open(dest, O_CREAT))) { 392 fd2 = vfs_lookup_open(dest, WALK_REGULAR | WALK_MAY_CREATE, MODE_WRITE); 393 if (fd2 < 0) { 389 394 printf("Unable to open destination file %s\n", dest); 390 close(fd1);395 vfs_put(fd1); 391 396 return -1; 392 397 } 393 398 394 total = lseek(fd1, 0, SEEK_END); 395 399 if (vfs_stat(fd1, &st) != EOK) { 400 printf("Unable to fstat %d\n", fd1); 401 vfs_put(fd1); 402 vfs_put(fd2); 403 return -1; 404 } 405 406 total = st.size; 396 407 if (vb) 397 408 printf("%" PRIu64 " bytes to copy\n", total); 398 399 lseek(fd1, 0, SEEK_SET);400 409 401 410 if (NULL == (buff = (char *) malloc(blen))) { … … 406 415 } 407 416 408 while ((bytes = read(fd1, buff, blen)) > 0) {409 if ((bytes = write(fd2, buff, bytes)) < 0)417 while ((bytes = vfs_read(fd1, &posr, buff, blen)) > 0) { 418 if ((bytes = vfs_write(fd2, &posw, buff, bytes)) < 0) 410 419 break; 411 420 copied += bytes; … … 413 422 414 423 if (bytes < 0) { 415 printf("\nError copying %s, (%d)\n", src, errno);424 printf("\nError copying %s, (%d)\n", src, bytes); 416 425 copied = bytes; 417 426 } 418 427 419 428 out: 420 close(fd1);421 close(fd2);429 vfs_put(fd1); 430 vfs_put(fd2); 422 431 if (buff) 423 432 free(buff); -
uspace/app/bdsh/cmds/modules/ls/ls.c
r39f892a9 r368ee04 34 34 #include <stdio.h> 35 35 #include <stdlib.h> 36 #include <unistd.h>37 36 #include <dirent.h> 38 #include <fcntl.h>39 37 #include <getopt.h> 40 38 #include <sys/types.h> 41 #include < sys/stat.h>39 #include <vfs/vfs.h> 42 40 #include <str.h> 43 41 #include <sort.h> … … 185 183 buff[len] = '\0'; 186 184 187 rc = stat(buff, &tosort[nbdirs++].s);188 if (rc != 0) {185 rc = vfs_stat_path(buff, &tosort[nbdirs++].s); 186 if (rc != EOK) { 189 187 printf("ls: skipping bogus node %s\n", buff); 190 printf("error=%d\n", errno);188 printf("error=%d\n", rc); 191 189 goto out; 192 190 } … … 315 313 static unsigned int ls_scope(const char *path, struct dir_elem_t *de) 316 314 { 317 if ( stat(path, &de->s) != 0) {315 if (vfs_stat_path(path, &de->s) != EOK) { 318 316 cli_error(CL_ENOENT, "%s", path); 319 317 return LS_BOGUS; … … 388 386 389 387 if (argc == 0) { 390 if ( getcwd(de.name, PATH_MAX) == NULL) {388 if (vfs_cwd_get(de.name, PATH_MAX) != EOK) { 391 389 cli_error(CL_EFAIL, "%s: Failed determining working " 392 390 "directory", cmdname); -
uspace/app/bdsh/cmds/modules/ls/ls.h
r39f892a9 r368ee04 1 1 #ifndef LS_H 2 2 #define LS_H 3 4 #include <vfs/vfs.h> 3 5 4 6 /* Various values that can be returned by ls_scope() */ -
uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
r39f892a9 r368ee04 30 30 #include <stdlib.h> 31 31 #include <dirent.h> 32 #include <fcntl.h>33 32 #include <sys/types.h> 34 #include <sys/stat.h>35 33 #include <getopt.h> 36 34 #include <stdarg.h> … … 98 96 99 97 if (!create_parents) { 100 if (mkdir(path, 0) != 0) { 98 ret = vfs_link_path(path, KIND_DIRECTORY, NULL); 99 if (ret != EOK) { 101 100 cli_error(CL_EFAIL, "%s: could not create %s (%s)", 102 cmdname, path, str_error( errno));101 cmdname, path, str_error(ret)); 103 102 ret = 1; 104 103 } … … 136 135 path[prev_off] = 0; 137 136 138 if (mkdir(path, 0) != 0 && errno != EEXIST) { 137 ret = vfs_link_path(path, KIND_DIRECTORY, NULL); 138 if (ret != EOK && ret != EEXIST) { 139 139 cli_error(CL_EFAIL, "%s: could not create %s (%s)", 140 cmdname, path, str_error( errno));140 cmdname, path, str_error(ret)); 141 141 ret = 1; 142 142 goto leave; … … 146 146 } 147 147 /* Create the final directory. */ 148 if (mkdir(path, 0) != 0) { 148 ret = vfs_link_path(path, KIND_DIRECTORY, NULL); 149 if (ret != EOK) { 149 150 cli_error(CL_EFAIL, "%s: could not create %s (%s)", 150 cmdname, path, str_error( errno));151 cmdname, path, str_error(ret)); 151 152 ret = 1; 152 153 } … … 207 208 208 209 if (follow && (argv[optind] != NULL)) { 209 if ( chdir(argv[optind]) != 0)210 if (vfs_cwd_set(argv[optind]) != EOK) 210 211 printf("%s: Error switching to directory.", cmdname); 211 212 } -
uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
r39f892a9 r368ee04 31 31 #include <stdlib.h> 32 32 #include <dirent.h> 33 #include <fcntl.h>34 33 #include <sys/types.h> 35 #include <sys/stat.h>36 34 #include <macros.h> 37 35 #include <getopt.h> … … 39 37 #include <str.h> 40 38 #include <ctype.h> 39 #include <vfs/vfs.h> 41 40 42 41 #include "config.h" … … 121 120 void *buffer; 122 121 bool create_sparse = false; 122 aoff64_t pos = 0; 123 123 124 124 file_size = 0; … … 156 156 file_name = argv[optind]; 157 157 158 fd = open(file_name, O_CREAT | O_EXCL | O_WRONLY, 0666);158 fd = vfs_lookup_open(file_name, WALK_REGULAR | WALK_MUST_CREATE, MODE_WRITE); 159 159 if (fd < 0) { 160 160 printf("%s: failed to create file %s.\n", cmdname, file_name); … … 164 164 if (create_sparse && file_size > 0) { 165 165 const char byte = 0x00; 166 167 if ((rc2 = lseek(fd, file_size - 1, SEEK_SET)) < 0) { 168 close(fd); 169 goto error; 170 } 171 172 rc2 = write(fd, &byte, sizeof(char)); 166 167 pos = file_size - 1; 168 rc2 = vfs_write(fd, &pos, &byte, sizeof(char)); 173 169 if (rc2 < 0) { 174 close(fd);170 vfs_put(fd); 175 171 goto error; 176 172 } … … 187 183 while (total_written < file_size) { 188 184 to_write = min(file_size - total_written, BUFFER_SIZE); 189 rc = write(fd, buffer, to_write);185 rc = vfs_write(fd, &pos, buffer, to_write); 190 186 if (rc <= 0) { 191 187 printf("%s: Error writing file (%d).\n", cmdname, errno); 192 close(fd);188 vfs_put(fd); 193 189 free(buffer); 194 190 return CMD_FAILURE; … … 199 195 free(buffer); 200 196 201 if ( close(fd) < 0)197 if (vfs_put(fd) < 0) 202 198 goto error; 203 199 -
uspace/app/bdsh/cmds/modules/mount/mount.c
r39f892a9 r368ee04 32 32 #include <str_error.h> 33 33 #include <vfs/vfs.h> 34 #include <vfs/vfs_mtab.h> 34 35 #include <adt/list.h> 35 36 #include <errno.h> … … 82 83 83 84 printf("%s", mtab_ent->fs_name); 84 if (mtab_ent->instance)85 printf("/%d", mtab_ent->instance);86 85 87 86 printf(" %s", mtab_ent->mp); … … 94 93 printf(" (%" PRIun ")", mtab_ent->service_id); 95 94 } 96 97 if (str_size(mtab_ent->opts) > 0)98 printf(" (%s)", mtab_ent->opts);99 95 100 96 putchar('\n'); … … 151 147 mopts = t_argv[4]; 152 148 153 rc = vfs_mount (t_argv[1], t_argv[2], dev, mopts, 0, instance);149 rc = vfs_mount_path(t_argv[2], t_argv[1], dev, mopts, 0, instance); 154 150 if (rc != EOK) { 155 151 printf("Unable to mount %s filesystem to %s on %s (rc=%s)\n", 156 t_argv[ 1], t_argv[2], t_argv[3], str_error(rc));152 t_argv[2], t_argv[1], t_argv[3], str_error(rc)); 157 153 return CMD_FAILURE; 158 154 } -
uspace/app/bdsh/cmds/modules/mv/mv.c
r39f892a9 r368ee04 30 30 #include <stdlib.h> 31 31 #include <errno.h> 32 #include <vfs/vfs.h> 32 33 #include "config.h" 33 34 #include "util.h" … … 59 60 } 60 61 61 rc = rename(argv[1], argv[2]);62 if (rc != 0) {62 rc = vfs_rename_path(argv[1], argv[2]); 63 if (rc != EOK) { 63 64 printf("Unable to rename %s to %s (error=%d)\n", 64 argv[1], argv[2], errno);65 argv[1], argv[2], rc); 65 66 return CMD_FAILURE; 66 67 } -
uspace/app/bdsh/cmds/modules/pwd/pwd.c
r39f892a9 r368ee04 30 30 #include <stdlib.h> 31 31 #include <mem.h> 32 #include <vfs/vfs.h> 33 #include <abi/errno.h> 32 34 33 35 #include "config.h" … … 57 59 memset(buff, 0, PATH_MAX); 58 60 59 if ( getcwd(buff, PATH_MAX) == NULL) {61 if (vfs_cwd_get(buff, PATH_MAX) != EOK) { 60 62 cli_error(CL_EFAIL, 61 63 "Unable to determine the current working directory"); -
uspace/app/bdsh/cmds/modules/rm/rm.c
r39f892a9 r368ee04 30 30 #include <stdio.h> 31 31 #include <stdlib.h> 32 #include <unistd.h>33 #include <fcntl.h>34 32 #include <dirent.h> 35 33 #include <getopt.h> 36 34 #include <mem.h> 37 35 #include <str.h> 36 #include <vfs/vfs.h> 38 37 39 38 #include "config.h" … … 110 109 memset(rm->cwd, 0, PATH_MAX); 111 110 112 chdir(".");113 114 if ( NULL == (getcwd(rm->owd, PATH_MAX)))111 vfs_cwd_set("."); 112 113 if (EOK != vfs_cwd_get(rm->owd, PATH_MAX)) 115 114 return 0; 116 115 … … 132 131 static unsigned int rm_single(const char *path) 133 132 { 134 if ( unlink(path) != 0) {133 if (vfs_unlink_path(path) != EOK) { 135 134 cli_error(CL_EFAIL, "rm: could not remove file %s", path); 136 135 return 1; … … 150 149 } 151 150 152 fd = open(path, O_RDONLY);151 fd = vfs_lookup(path, WALK_REGULAR); 153 152 if (fd >= 0) { 154 close(fd);153 vfs_put(fd); 155 154 return RM_FILE; 156 155 } … … 201 200 202 201 /* First see if it will just go away */ 203 rc = rmdir(path);204 if (rc == 0)202 rc = vfs_unlink_path(path); 203 if (rc == EOK) 205 204 return 0; 206 205 … … 209 208 210 209 /* Delete directory */ 211 rc = rmdir(path);212 if (rc == 0)213 return errno;210 rc = vfs_unlink_path(path); 211 if (rc == EOK) 212 return EOK; 214 213 215 214 cli_error(CL_ENOTSUP, "Can not remove %s", path); -
uspace/app/bdsh/cmds/modules/touch/touch.c
r39f892a9 r368ee04 35 35 #include <stdlib.h> 36 36 #include <unistd.h> 37 #include <fcntl.h>38 37 #include <dirent.h> 39 38 #include <sys/types.h> 40 39 #include <str.h> 41 40 #include <getopt.h> 42 #include <sys/stat.h>43 41 #include <errno.h> 42 #include <vfs/vfs.h> 44 43 45 44 #include "config.h" … … 123 122 124 123 /* Check whether file exists if -c (--no-create) option is given */ 125 if ((!no_create) || ((no_create) && (stat(buff, &file_stat) == 0))) 126 fd = open(buff, O_RDWR | O_CREAT); 124 if ((!no_create) || 125 ((no_create) && (vfs_stat_path(buff, &file_stat) == EOK))) { 126 fd = vfs_lookup(buff, WALK_REGULAR | WALK_MAY_CREATE); 127 } 127 128 128 129 if (fd < 0) { … … 132 133 continue; 133 134 } else { 134 close(fd);135 vfs_put(fd); 135 136 fd = -1; 136 137 } -
uspace/app/bdsh/cmds/modules/unmount/unmount.c
r39f892a9 r368ee04 66 66 } 67 67 68 rc = vfs_unmount (argv[1]);68 rc = vfs_unmount_path(argv[1]); 69 69 if (rc != EOK) { 70 70 printf("Unable to unmount %s (rc=%d)\n", argv[1], rc); -
uspace/app/bdsh/compl.c
r39f892a9 r368ee04 33 33 #include <macros.h> 34 34 #include <stdlib.h> 35 #include < sys/stat.h>35 #include <vfs/vfs.h> 36 36 37 37 #include "cmds/cmds.h" … … 360 360 asprintf(&ent_path, "%s/%s", *cs->path, dent->d_name); 361 361 struct stat ent_stat; 362 if ( stat(ent_path, &ent_stat) != 0) {362 if (vfs_stat_path(ent_path, &ent_stat) != EOK) { 363 363 /* Error */ 364 364 free(ent_path); -
uspace/app/bdsh/exec.c
r39f892a9 r368ee04 37 37 #include <unistd.h> 38 38 #include <str.h> 39 #include <fcntl.h>40 39 #include <str_error.h> 41 40 #include <errno.h> … … 60 59 int fd; 61 60 62 fd = open(f, O_RDONLY);61 fd = vfs_lookup_open(f, WALK_REGULAR, MODE_READ); 63 62 if (fd >= 0) { 64 close(fd);63 vfs_put(fd); 65 64 return 0; 66 65 } else … … 101 100 char *tmp; 102 101 int rc, retval, i; 103 int file_handles[3]; 104 int *file_handles_p[4]; 102 int file_handles[3] = { -1, -1, -1 }; 105 103 FILE *files[3]; 106 104 … … 113 111 114 112 for (i = 0; i < 3 && files[i] != NULL; i++) { 115 if (vfs_fhandle(files[i], &file_handles[i]) == EOK) { 116 file_handles_p[i] = &file_handles[i]; 117 } 118 else { 119 file_handles_p[i] = NULL; 120 } 113 vfs_fhandle(files[i], &file_handles[i]); 121 114 } 122 file_handles_p[i] = NULL;123 115 124 rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv, file_handles_p); 116 rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv, 117 file_handles[0], file_handles[1], file_handles[2]); 125 118 free(tmp); 126 119 -
uspace/app/bdsh/util.c
r39f892a9 r368ee04 31 31 #include <stdarg.h> 32 32 #include <stdlib.h> 33 #include <vfs/vfs.h> 34 #include <abi/errno.h> 33 35 34 36 #include "config.h" … … 58 60 return 1; 59 61 } 60 if ( !getcwd(usr->cwd, PATH_MAX))62 if (vfs_cwd_get(usr->cwd, PATH_MAX) != EOK) 61 63 snprintf(usr->cwd, PATH_MAX, "(unknown)"); 62 64
Note:
See TracChangeset
for help on using the changeset viewer.
