mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-11-09 08:38:04 +08:00
测试proc文件系统的读写...
This commit is contained in:
1 parent
94a6bb198b
commit
2bb35bb994
5 files changed
+2
-35
No files matched your search
Whitespace-only changes.
@@ -10,6 +10,8 @@ char global_buffer[STRINGLEN];
|
||||
|
||||
struct proc_dir_entry *example_dir, *proc_hello_file;
|
||||
|
||||
|
||||
|
||||
int proc_read_hello(char *page, char **start, off_t off, int count, int *eof,
|
||||
void *data)
|
||||
{
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/vermagic.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
MODULE_INFO(vermagic, VERMAGIC_STRING);
|
||||
|
||||
__visible struct module __this_module
|
||||
__attribute__((section(".gnu.linkonce.this_module"))) = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.init = init_module,
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
.exit = cleanup_module,
|
||||
#endif
|
||||
.arch = MODULE_ARCH_INIT,
|
||||
};
|
||||
|
||||
static const struct modversion_info ____versions[]
|
||||
__used
|
||||
__attribute__((section("__versions"))) = {
|
||||
{ 0x146be775, __VMLINUX_SYMBOL_STR(module_layout) },
|
||||
{ 0xcb6fa3da, __VMLINUX_SYMBOL_STR(remove_proc_entry) },
|
||||
{ 0xb35b1c13, __VMLINUX_SYMBOL_STR(proc_create_data) },
|
||||
{ 0x53027231, __VMLINUX_SYMBOL_STR(proc_mkdir) },
|
||||
{ 0xfbc74f64, __VMLINUX_SYMBOL_STR(__copy_from_user) },
|
||||
{ 0xdcb764ad, __VMLINUX_SYMBOL_STR(memset) },
|
||||
{ 0x27e1a049, __VMLINUX_SYMBOL_STR(printk) },
|
||||
{ 0x91715312, __VMLINUX_SYMBOL_STR(sprintf) },
|
||||
};
|
||||
|
||||
static const char __module_depends[]
|
||||
__used
|
||||
__attribute__((section(".modinfo"))) =
|
||||
"depends=";
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
kernel//home/gatieme/Work/GitHub/LDD-LinuxDeviceDrivers/study/test/hello_proc.ko
|
||||
Binary file not shown.
Reference in new issue
Block a user