This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux | |
index 060db6a..65fdde2 100644 | |
--- a/pppd/Makefile.linux | |
+++ b/pppd/Makefile.linux | |
@@ -32,7 +32,7 @@ endif | |
# CC = gcc | |
# | |
-COPTS = -O2 -pipe -Wall -g | |
+COPTS = -static -O2 -pipe -Wall -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/fs.h> | |
#include <linux/cdev.h> | |
#include <asm/uaccess.h> | |
static struct cdev freg_cdev; //An instance of a character device | |
static dev_t ndev; //The node of the device | |
/* "freg"设备的全局变量 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/fs.h> | |
#include <linux/cdev.h> | |
#include <asm/uaccess.h> | |
static struct cdev freg_cdev; //An instance of a character device | |
static dev_t ndev; //The node of the device | |
/* "freg"设备的全局变量 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/init.h> | |
#include <linux/fs.h> | |
#include <asm/uaccess.h> | |
/* 主设备号 */ | |
#define MAJOR_NUM 250 | |
static ssize_t freg_read(struct file* filp, char __user *buf, size_t count, loff_t* f_pos); | |
static ssize_t freg_write(struct file* filp, const char __user *buf, size_t count, loff_t* f_pos); |
NewerOlder