Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
78418f3
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
acrn
auxdisplay
binderfs
bpf
cgroup
check-exec
configfs
connector
coresight
damon
fanotify
fprobe
ftrace
hid
hidraw
hw_breakpoint
kdb
kfifo
kmemleak
kobject
kprobes
landlock
livepatch
mei
nitro_enclaves
pfsm
pidfd
pktgen
qmi
rpmsg
rust
hostprogs
Kconfig
Makefile
rust_driver_faux.rs
rust_driver_pci.rs
rust_driver_platform.rs
rust_minimal.rs
rust_misc_device.rs
rust_print_events.c
rust_print_main.rs
seccomp
timers
trace_events
trace_printk
uhid
user_events
v4l
vfio-mdev
vfs
watch_queue
watchdog
Kconfig
Makefile
scripts
security
sound
tools
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
samples
/
rust
/
rust_driver_faux.rs
Blame
Blame
Latest commit
History
History
29 lines (21 loc) · 666 Bytes
Breadcrumbs
linux
/
samples
/
rust
/
rust_driver_faux.rs
Top
File metadata and controls
Code
Blame
29 lines (21 loc) · 666 Bytes
Raw
// SPDX-License-Identifier: GPL-2.0-only //! Rust faux device sample. use kernel::{c_str, faux, prelude::*, Module}; module! { type: SampleModule, name: "rust_faux_driver", author: "Lyude Paul", description: "Rust faux device sample", license: "GPL", } struct SampleModule { _reg: faux::Registration, } impl Module for SampleModule { fn init(_module: &'static ThisModule) -> Result<Self> { pr_info!("Initialising Rust Faux Device Sample\n"); let reg = faux::Registration::new(c_str!("rust-faux-sample-device"))?; dev_info!(reg.as_ref(), "Hello from faux device!\n"); Ok(Self { _reg: reg }) } }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
You can’t perform that action at this time.