This function opens a file.
The _sys_open function is required by fopen() and freopen(). These functions, in turn, are required if any file input/output function is to be used.
The openmode parameter is a bitmap, whose bits mostly correspond directly to the ISO mode specification. See rt_sys.h for more information. Target‑dependent extensions are possible, but freopen() must also be extended.