-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch renames the Linux and Darwin OS drivers to the Unix OS driver. This driver is loaded for both the Linux and Darwin OSs. The Darwin implementation lacks implementations of the Mount & Format functions.
- Loading branch information
Showing
15 changed files
with
410 additions
and
192 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
// +build darwin | ||
|
||
#include "unix_darwin.h" | ||
#include <errno.h> | ||
|
||
statfs_result _statfs(char* path) { | ||
statfs_result r; | ||
r.val = (struct statfs*)malloc(sizeof(struct statfs)); | ||
r.err = statfs((const char*) path, r.val) == 0 ? 0 : errno; | ||
return r; | ||
} | ||
|
||
getmntinfo_result _getmntinfo(int flags) { | ||
getmntinfo_result r; | ||
r.err = 0; | ||
r.len = getmntinfo(&r.val, flags); | ||
if (r.len < 1) { | ||
r.err = errno; | ||
r.len = 0; | ||
} | ||
return r; | ||
} |
Oops, something went wrong.