Changes in uspace/app/bdsh/cmds/modules/cat/cat.c [8e3498b:39330200] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
r8e3498b r39330200 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); … … 195 195 /* Allow storing the whole UTF-8 character. */ 196 196 blen = STR_BOUNDS(1); 197 } else 198 fd = vfs_lookup_open(fname, WALK_REGULAR, MODE_READ); 197 } else { 198 errno_t rc = vfs_lookup_open(fname, WALK_REGULAR, MODE_READ, &fd); 199 if (rc != EOK) { 200 fd = -1; 201 } 202 } 199 203 200 204 if (fd < 0) { … … 211 215 212 216 if (tail != CAT_FULL_FILE) { 213 struct stat st;217 vfs_stat_t st; 214 218 215 219 if (vfs_stat(fd, &st) != EOK) { … … 312 316 bool tailFirst = false; 313 317 sysarg_t rows, cols; 314 int rc;318 errno_t rc; 315 319 316 320 /* … … 324 328 console_rows = 0; 325 329 should_quit = false; 330 dash_represents_stdin = false; 326 331 console = console_init(stdin, stdout); 327 332 number = false; … … 334 339 335 340 for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) { 336 c = getopt_long(argc, argv, "xhvmH:t:b:s :n", long_options, &opt_ind);341 c = getopt_long(argc, argv, "xhvmH:t:b:sn", long_options, &opt_ind); 337 342 switch (c) { 338 343 case 'h':
Note:
See TracChangeset
for help on using the changeset viewer.