1/* 2 * Copyright 2002-2009, Axel D��rfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include <errno.h> 8#include <sys/stat.h> 9 10#include <errno_private.h> 11#include <syscalls.h> 12#include <syscall_utils.h> 13#include <umask.h> 14 15 16int 17mkdir(const char* path, mode_t mode) 18{ 19 RETURN_AND_SET_ERRNO(_kern_create_dir(-1, path, mode & ~__gUmask)); 20} 21 22 23int 24mkdirat(int fd, const char *path, mode_t mode) 25{ 26 RETURN_AND_SET_ERRNO(_kern_create_dir(fd, path, mode & ~__gUmask)); 27} 28