e306e3f855
The current implementation of open requires the user to pass all three args to the function. It should use a va_list and allow a user to provide only the filename and flags.
14 lines
248 B
C
14 lines
248 B
C
#ifndef _BITS_FCNTL_H
|
|
#define _BITS_FCNTL_H
|
|
|
|
int open(const char* filename, int flags, ...) {
|
|
mode_t mode = 0;
|
|
va_list ap;
|
|
va_start(ap, flags);
|
|
mode = va_arg(ap, mode_t);
|
|
va_end(ap);
|
|
return sys_open(filename, flags, mode);
|
|
}
|
|
|
|
#endif
|