Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACS
Public
HermitOS
kernel
Commits
b8702113
Commit
b8702113
authored
4 years ago
by
Stefan Lankes
Browse files
Options
Downloads
Patches
Plain Diff
minor changes to build libhermit without PCI support
parent
0505c1c6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/drivers/mod.rs
+5
-0
5 additions, 0 deletions
src/drivers/mod.rs
src/drivers/net/mod.rs
+2
-0
2 additions, 0 deletions
src/drivers/net/mod.rs
src/syscalls/interfaces/mod.rs
+2
-0
2 additions, 0 deletions
src/syscalls/interfaces/mod.rs
with
9 additions
and
0 deletions
src/drivers/mod.rs
+
5
−
0
View file @
b8702113
...
...
@@ -16,17 +16,22 @@
//#[cfg(not(feature = "newlib"))]
pub
mod
net
;
#[cfg(feature
=
"pci"
)]
pub
mod
virtio
;
#[cfg(feature
=
"pci"
)]
use
crate
::
drivers
::
error
::
DriverError
;
#[cfg(feature
=
"pci"
)]
pub
type
Result
<
T
>
=
core
::
result
::
Result
<
T
,
DriverError
>
;
/// A common error module for drivers.
/// [DriverError](enums.drivererror.html) values will be
/// passed on to higher layers.
#[cfg(feature
=
"pci"
)]
pub
mod
error
{
use
crate
::
drivers
::
virtio
::
error
::
VirtioError
;
use
core
::
fmt
;
#[derive(Debug)]
pub
enum
DriverError
{
InitVirtioDevFail
(
VirtioError
),
...
...
This diff is collapsed.
Click to expand it.
src/drivers/net/mod.rs
+
2
−
0
View file @
b8702113
...
...
@@ -5,6 +5,8 @@
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#[cfg(feature
=
"pci"
)]
pub
mod
virtio_net
;
use
crate
::
arch
::
kernel
::
percore
::
*
;
...
...
This diff is collapsed.
Click to expand it.
src/syscalls/interfaces/mod.rs
+
2
−
0
View file @
b8702113
...
...
@@ -166,6 +166,7 @@ pub trait SyscallInterface: Send + Sync {
}
fn
receive_rx_buffer
(
&
self
)
->
Result
<
(
&
'static
[
u8
],
usize
),
()
>
{
#[cfg(feature
=
"pci"
)]
match
arch
::
kernel
::
pci
::
get_network_driver
()
{
Some
(
driver
)
=>
driver
.lock
()
.receive_rx_buffer
(),
_
=>
Err
(()),
...
...
@@ -175,6 +176,7 @@ pub trait SyscallInterface: Send + Sync {
}
fn
rx_buffer_consumed
(
&
self
,
handle
:
usize
)
->
Result
<
(),
()
>
{
#[cfg(feature
=
"pci"
)]
match
arch
::
kernel
::
pci
::
get_network_driver
()
{
Some
(
driver
)
=>
{
driver
.lock
()
.rx_buffer_consumed
(
handle
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment