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