vxKernel/kernel/src/modules/fs/open.c

38 lines
525 B
C
Raw Normal View History

VxKernel 0.6.0-17 : Add RTC driver + prepare FS support @add <> include/vhex/display/draw/rect | add filled rectangle API <> src/display/draw/drect | add filled rectangle drawing API <> board/fxcg50/ | add devices special section (WIP) <> include/vhex/device | add device structure (WIP) <> include/vhex/driver/mpu/sh/sh7305/ | [intc] add primitive which allow dummy default interrupt handler | [rtc] add complete RTC hardware structure | [rtc] add hardware-level kernel API <> include/vhex/fs | add file system abstraction API (WIP) | add Fugue FAT file system abstraction API (WIP) <> include/vhex/rtc | add RTC user-level API | add driver-level interface | add kernel-level types <> src/fs | add base Fugue abstraction (WIP) | add libc functions (WIP) @update <> include/vhex/display/draw/text | merge halign and valign argument | add special alignment flags <> include/vhex/driver | add RTC driver flags <> include/vhex/driver/mpu/sh/sh7305/cpg | rename weird field | add Spread Spectrum emulator field | properly expand LSTATS register <> src/driver/mpu/sh/sh7305 | [intc] allow user-level interrupt handler installation | [intc] expose common interrupt handler | [rtc] add RTC entire driver <> src/driver/scree/r61524 | use complete VRAM instead of fragmented render @fix <> src/display | [text] fix height for text display geometry | [text] fix alignment calculation | [dclear] fix geometry support <> src/driver/mpu/sh/sh7305 | [cpg] fix driver installation | [cpg] fix driver spread spectrum | [cpg] fix driver declaration | [tmu] fix exception with the profiling primitives
2022-08-08 20:19:00 +02:00
#include <vhex/fs.h>
#include <errno.h>
#include <stdarg.h>
/* open() : try to open file */
int open(const char *pathname, int flags, ...)
{
(void)pathname;
(void)flags;
return -1;
VxKernel 0.6.0-17 : Add RTC driver + prepare FS support @add <> include/vhex/display/draw/rect | add filled rectangle API <> src/display/draw/drect | add filled rectangle drawing API <> board/fxcg50/ | add devices special section (WIP) <> include/vhex/device | add device structure (WIP) <> include/vhex/driver/mpu/sh/sh7305/ | [intc] add primitive which allow dummy default interrupt handler | [rtc] add complete RTC hardware structure | [rtc] add hardware-level kernel API <> include/vhex/fs | add file system abstraction API (WIP) | add Fugue FAT file system abstraction API (WIP) <> include/vhex/rtc | add RTC user-level API | add driver-level interface | add kernel-level types <> src/fs | add base Fugue abstraction (WIP) | add libc functions (WIP) @update <> include/vhex/display/draw/text | merge halign and valign argument | add special alignment flags <> include/vhex/driver | add RTC driver flags <> include/vhex/driver/mpu/sh/sh7305/cpg | rename weird field | add Spread Spectrum emulator field | properly expand LSTATS register <> src/driver/mpu/sh/sh7305 | [intc] allow user-level interrupt handler installation | [intc] expose common interrupt handler | [rtc] add RTC entire driver <> src/driver/scree/r61524 | use complete VRAM instead of fragmented render @fix <> src/display | [text] fix height for text display geometry | [text] fix alignment calculation | [dclear] fix geometry support <> src/driver/mpu/sh/sh7305 | [cpg] fix driver installation | [cpg] fix driver spread spectrum | [cpg] fix driver declaration | [tmu] fix exception with the profiling primitives
2022-08-08 20:19:00 +02:00
#if 0
va_list ap;
void *data;
int mode;
va_start(ap, flags);
mode = va_arg(ap, int);
va_end(ap);
if (fs_info.fs.primitives.open == NULL) {
errno = ENOMEDIUM;
return -1;
}
errno = fs_table_reserve(&data);
if (errno != 0)
return -1;
return fs_info.fs.primitives.open(
data,
pathname,
flags,
mode
);
#endif
}