Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
drivers
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Liam Naddell
drivers
Commits
1e701391
Commit
1e701391
authored
Apr 15, 2017
by
Jeremy Soller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add path implementation for e1000d and ahcid
parent
35cd7e4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
ahcid/src/scheme.rs
ahcid/src/scheme.rs
+11
-0
e1000d/src/device.rs
e1000d/src/device.rs
+10
-0
No files found.
ahcid/src/scheme.rs
View file @
1e701391
...
...
@@ -98,6 +98,17 @@ impl Scheme for DiskScheme {
}
}
fn
fpath
(
&
self
,
_
id
:
usize
,
buf
:
&
mut
[
u8
])
->
Result
<
usize
>
{
//TODO: Get path
let
mut
i
=
0
;
let
scheme_path
=
b
"disk:"
;
while
i
<
buf
.len
()
&&
i
<
scheme_path
.len
()
{
buf
[
i
]
=
scheme_path
[
i
];
i
+=
1
;
}
Ok
(
i
)
}
fn
read
(
&
self
,
id
:
usize
,
buf
:
&
mut
[
u8
])
->
Result
<
usize
>
{
let
mut
handles
=
self
.handles
.lock
();
match
*
handles
.get_mut
(
&
id
)
.ok_or
(
Error
::
new
(
EBADF
))
?
{
...
...
e1000d/src/device.rs
View file @
1e701391
...
...
@@ -194,6 +194,16 @@ impl Scheme for Intel8254x {
Ok
(
0
)
}
fn
fpath
(
&
self
,
_
id
:
usize
,
buf
:
&
mut
[
u8
])
->
Result
<
usize
>
{
let
mut
i
=
0
;
let
scheme_path
=
b
"network:"
;
while
i
<
buf
.len
()
&&
i
<
scheme_path
.len
()
{
buf
[
i
]
=
scheme_path
[
i
];
i
+=
1
;
}
Ok
(
i
)
}
fn
fsync
(
&
self
,
_
id
:
usize
)
->
Result
<
usize
>
{
Ok
(
0
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment