Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
drivers
Commits
2e07aab6
Commit
2e07aab6
authored
Dec 01, 2017
by
Browse files
fixed pcid unsafe problem
parent
2b4b9403
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcid/src/main.rs
View file @
2e07aab6
...
...
@@ -41,15 +41,13 @@ fn main() {
if
let
Some
(
header
)
=
func
.header
()
{
let
pci_class
=
PciClass
::
from
(
header
.class
);
let
mut
string
;
unsafe
{
string
=
format!
(
"PCI {:>02X}/{:>02X}/{:>02X} {:>04X}:{:>04X} {:>02X}.{:>02X}.{:>02X}.{:>02X} {:?}"
,
let
mut
string
=
unsafe
{
format!
(
"PCI {:>02X}/{:>02X}/{:>02X} {:>04X}:{:>04X} {:>02X}.{:>02X}.{:>02X}.{:>02X} {:?}"
,
bus
.num
,
dev
.num
,
func
.num
,
header
.vendor_id
,
header
.device_id
,
header
.class
,
header
.subclass
,
header
.interface
,
header
.revision
,
pci_class
)
;
}
pci_class
)
}
;
match
pci_class
{
PciClass
::
Storage
=>
match
header
.subclass
{
...
...
Write
Preview
Supports
Markdown
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