1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2012-12-20 22:47:11 +01:00
parent 9ad7690c74
commit 06e2025a87

View file

@ -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;