-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
856e556
commit d9190e6
Showing
6 changed files
with
482 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <sys/types.h> | ||
#include <sys/vfs.h> | ||
#include <unistd.h> | ||
#include <fcntl.h> | ||
#include <errno.h> | ||
#include <string.h> | ||
#include <sys/ioctl.h> | ||
|
||
/* create a directory */ | ||
int _mkdir(const char *orig_name) | ||
{ | ||
int r; | ||
struct vfs *v; | ||
char *name = __getfilebuffer(); | ||
v = (struct vfs *)__getvfsforfile(name, orig_name, NULL); | ||
if (!v || !v->open) { | ||
#ifdef _DEBUG | ||
__builtin_printf("mkdir: ENOSYS: vfs=%x\n", (unsigned)v); | ||
#endif | ||
return _seterror(ENOSYS); | ||
} | ||
r = (*v->mkdir)(name); | ||
if (r != 0) { | ||
return _seterror(-r); | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.