This commit is contained in:
parent
31ef96ebfc
commit
bab9600be5
@ -13,6 +13,9 @@ extern "C"
|
||||
/* Open a file path and return a file descriptor to it. */
|
||||
int open(const char* path, int flags, ...);
|
||||
|
||||
/* Create a file and return a file descriptor to it. */
|
||||
int creat(const char* path, mode_t mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -18,4 +18,9 @@ extern "C"
|
||||
va_end(ap);
|
||||
__errno_return(rc, int);
|
||||
}
|
||||
|
||||
int creat(const char* path, mode_t mode)
|
||||
{
|
||||
return open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user