-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: TalonFloof <[email protected]>
- Loading branch information
1 parent
b633af9
commit c1ac523
Showing
27 changed files
with
218 additions
and
109 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
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 |
---|---|---|
@@ -1,19 +1,39 @@ | ||
const std = @import("std"); | ||
|
||
pub const Metadata = extern struct { | ||
deviceID: u64 = 0, | ||
ID: u64 = 0, | ||
mode: u32 = 0, | ||
nlinks: u32 = 0, | ||
uid: u32 = 1, | ||
gid: u32 = 1, | ||
rdev: u64 = 0, // Device ID (Optional) | ||
size: u64 = 0, | ||
atime: i64 = 0, | ||
reserved1: u64 = 0, | ||
mtime: i64 = 0, | ||
reserved2: u64 = 0, | ||
ctime: i64 = 0, | ||
reserved3: u64 = 0, | ||
blksize: u64 = 0, | ||
blocks: u64 = 0, | ||
}; | ||
|
||
pub const VNode = extern struct { | ||
name: [256]u8 = [_]u8{0} ** 256. | ||
name: [256]u8 = [_]u8{0} ** 256, | ||
stat: Metadata = Metadata{ .ID = 0 }, | ||
|
||
unreferenced: ?*fn (*VNode) callconv(.C) c_long = null, | ||
open: ?*fn(*VNode) callconv(.C) c_long = null, | ||
close: ?*fn(*VNode) callconv(.C) c_long = null, | ||
readDir: ?*fn(*VNode, u32, *DirEntry) callconv(.C) c_long = null, | ||
findDir: ?*fn(*VNode, [*c]const u8, *?*VNode) callconv(.C) c_long = null, | ||
truncate: ?*fn(*VNode, usize) callconv(.C) c_long = null, | ||
create: ?*fn(*VNode, [*c]const u8, usize) callconv(.C) c_long = null, | ||
unlink: ?*fn(*VNode, [*c]const u8) callconv(.C) c_long = null, | ||
rename: ?*fn(*VNode, [*c]const u8, *VNode, [*c]const u8) callconv(.C) c_long = null, | ||
ioctl: ?*fn(*VNode, c_ulong, ?*anyopaque) callconv(.C) c_long = null, | ||
open: ?*fn (*VNode) callconv(.C) c_long = null, | ||
close: ?*fn (*VNode) callconv(.C) c_long = null, | ||
readDir: ?*fn (*VNode, u32, *DirEntry) callconv(.C) c_long = null, | ||
findDir: ?*fn (*VNode, [*c]const u8, *?*VNode) callconv(.C) c_long = null, | ||
truncate: ?*fn (*VNode, usize) callconv(.C) c_long = null, | ||
create: ?*fn (*VNode, [*c]const u8, usize) callconv(.C) c_long = null, | ||
unlink: ?*fn (*VNode, [*c]const u8) callconv(.C) c_long = null, | ||
rename: ?*fn (*VNode, [*c]const u8, *VNode, [*c]const u8) callconv(.C) c_long = null, | ||
ioctl: ?*fn (*VNode, c_ulong, ?*anyopaque) callconv(.C) c_long = null, | ||
|
||
read: ?*fn(*VNode, usize, *anyopaque, usize) callconv(.C) c_long = null, | ||
write: ?*fn(*VNode, usize, *anyopaque, usize) callconv(.C) c_long = null, | ||
}; | ||
read: ?*fn (*VNode, usize, *anyopaque, usize) callconv(.C) c_long = null, | ||
write: ?*fn (*VNode, usize, *anyopaque, usize) callconv(.C) c_long = null, | ||
}; |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Empty file.
Empty file.
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 @@ | ||
const PCI_VENDOR_ID: u16 = 0x00; | ||
const PCI_DEVICE_ID: u16 = 0x02; | ||
const PCI_COMMAND: u16 = 0x04; | ||
const PCI_STATUS: u16 = 0x06; | ||
const PCI_REVISION_ID: u16 = 0x08; | ||
const PCI_SUBSYSTEM_ID: u16 = 0x2e; | ||
const PCI_PROG_IF: u16 = 0x09; | ||
const PCI_SUBCLASS: u16 = 0x0a; | ||
const PCI_CLASS: u16 = 0x0b; | ||
const PCI_CACHE_LINE_SIZE: u16 = 0x0c; | ||
const PCI_LATENCY_TIMER: u16 = 0x0d; | ||
const PCI_HEADER_TYPE: u16 = 0x0e; | ||
const PCI_BIST: u16 = 0x0f; | ||
const PCI_BAR0: u16 = 0x10; | ||
const PCI_BAR1: u16 = 0x14; | ||
const PCI_BAR2: u16 = 0x18; | ||
const PCI_BAR3: u16 = 0x1c; | ||
const PCI_BAR4: u16 = 0x20; | ||
const PCI_BAR5: u16 = 0x24; | ||
const PCI_INTERRUPT_LINE: u16 = 0x3c; | ||
const PCI_INTERRUPT_PIN: u16 = 0x3d; | ||
const PCI_SECONDARY_BUS: u16 = 0x19; |
Empty file.
Oops, something went wrong.