9 int open(const char *name
, int flags
, ...)
15 memset(&m
, 0, sizeof(m
));
16 va_start(argp
, flags
);
17 /* Depending on whether O_CREAT is set, a different message layout is used,
18 * and therefore a different call number as well.
20 if (flags
& O_CREAT
) {
21 m
.m_lc_vfs_creat
.len
= strlen(name
) + 1;
22 m
.m_lc_vfs_creat
.flags
= flags
;
23 m
.m_lc_vfs_creat
.mode
= va_arg(argp
, mode_t
);
24 m
.m_lc_vfs_creat
.name
= (vir_bytes
)name
;
28 m
.m_lc_vfs_path
.flags
= flags
;
32 return (_syscall(VFS_PROC_NR
, call
, &m
));