mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Add support for useless 't' mode in fopen.
This commit is contained in:
parent
9ad7690c74
commit
06e2025a87
1 changed files with 6 additions and 1 deletions
|
@ -146,6 +146,7 @@ int fdio_install(FILE* fp, const char* mode, int fd)
|
|||
case 'w': fdio->flags |= FDIO_WRITING; break;
|
||||
case '+': fdio->flags |= FDIO_READING | FDIO_WRITING; break;
|
||||
case 'a': fdio->flags |= FDIO_WRITING | FDIO_APPEND; break;
|
||||
case 't': break;
|
||||
case 'b': break;
|
||||
default: errno = EINVAL; free(fdio); return 0;
|
||||
}
|
||||
|
@ -200,7 +201,11 @@ FILE* fopen(const char* path, const char* mode)
|
|||
omode = O_RDWR;
|
||||
break;
|
||||
case 'b': break;
|
||||
default: errno = EINVAL; return 0;
|
||||
case 't': break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported fopen mode: '%s'\n", origmode);
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
mode = origmode;
|
||||
|
|
Loading…
Reference in a new issue