亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? modprobe.c

?? GCC資料大全
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* modprobe.c: insert a module into the kernel, intelligently.    Copyright (C) 2001  Rusty Russell.    Copyright (C) 2002, 2003  Rusty Russell, IBM Corporation.    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#define _GNU_SOURCE /* asprintf */#include <sys/utsname.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/mman.h>#include <fcntl.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <ctype.h>#include <string.h>#include <errno.h>#include <unistd.h>#include <dirent.h>#include <limits.h>#include <elf.h>#include <getopt.h>#include <fnmatch.h>#include <asm/unistd.h>#include <sys/wait.h>#include <syslog.h>#define streq(a,b) (strcmp((a),(b)) == 0)#include "zlibsupport.h"#include "list.h"#include "backwards_compat.c"extern long init_module(void *, unsigned long, const char *);extern long delete_module(const char *, unsigned int);struct module {	struct list_head list;	char *modname;	char filename[0];};#ifndef MODULE_DIR#define MODULE_DIR "/lib/modules"#endiftypedef void (*errfn_t)(const char *fmt, ...);/* Do we use syslog or stderr for messages? */static int log;static void message(const char *prefix, const char *fmt, va_list *arglist){	char *buf, *buf2;	vasprintf(&buf, fmt, *arglist);	asprintf(&buf2, "%s%s", prefix, buf);	if (log)		syslog(LOG_NOTICE, buf2);	else		fprintf(stderr, "%s", buf2);	free(buf2);	free(buf);}static void warn(const char *fmt, ...){	va_list arglist;	va_start(arglist, fmt);	message("WARNING: ", fmt, &arglist);	va_end(arglist);}static void fatal(const char *fmt, ...){	va_list arglist;	va_start(arglist, fmt);	message("FATAL: ", fmt, &arglist);	va_end(arglist);	exit(1);}static void grammar(const char *cmd, const char *filename, unsigned int line){	warn("%s line %u: ignoring bad line starting with '%s'\n",	     filename, line, cmd);}static void *do_nofail(void *ptr, const char *file, int line, const char *expr){	if (!ptr) {		fatal("Memory allocation failure %s line %d: %s.\n",		      file, line, expr);	}	return ptr;}#define NOFAIL(ptr)	do_nofail((ptr), __FILE__, __LINE__, #ptr)static void print_usage(const char *progname){	fprintf(stderr,		"Usage: %s [-v] [-V] [-C config-file] [-n] [-i] [-q] [-o <modname>] <modname> [parameters...]\n"		"%s -r [-n] [-i] [-v] <modulename> ...\n"		"%s -l -t <dirname> [ -a <modulename> ...]\n",		progname, progname, progname);	exit(1);}static int fgetc_wrapped(FILE *file, unsigned int *linenum){	for (;;) {	  	int ch = fgetc(file);		if (ch != '\\')			return ch;		ch = fgetc(file);		if (ch != '\n')			return ch;		if (linenum)			(*linenum)++;	}}static char *getline_wrapped(FILE *file, unsigned int *linenum){	int size = 1024;	int i = 0;	char *buf = NOFAIL(malloc(size));	for(;;) {		int ch = fgetc_wrapped(file, linenum);		if (i == size) {			size *= 2;			buf = NOFAIL(realloc(buf, size));		}		if (ch < 0 && i == 0) {			free(buf);			return NULL;		}		if (ch < 0 || ch == '\n') {			if (linenum)				(*linenum)++;			buf[i] = '\0';			return NOFAIL(realloc(buf, i+1));		}		buf[i++] = ch;	}}static struct module *find_module(const char *filename, struct list_head *list){	struct module *i;	list_for_each_entry(i, list, list) {		if (strcmp(i->filename, filename) == 0)			return i;	}	return NULL;}/* Convert filename to the module name.  Works if filename == modname, too. */static void filename2modname(char *modname, const char *filename){	const char *afterslash;	unsigned int i;	afterslash = strrchr(filename, '/');	if (!afterslash)		afterslash = filename;	else		afterslash++;	/* Convert to underscores, stop at first . */	for (i = 0; afterslash[i] && afterslash[i] != '.'; i++) {		if (afterslash[i] == '-')			modname[i] = '_';		else			modname[i] = afterslash[i];	}	modname[i] = '\0';}static void add_module(char *filename, int namelen, struct list_head *list){	struct module *mod;	/* If it's a duplicate: move it to the end, so it gets	   inserted where it is *first* required. */	mod = find_module(filename, list);	if (mod)		list_del(&mod->list);	else {		/* No match.  Create a new module. */		mod = NOFAIL(malloc(sizeof(struct module) + namelen + 1));		memcpy(mod->filename, filename, namelen);		mod->filename[namelen] = '\0';		mod->modname = NOFAIL(malloc(namelen + 1));		filename2modname(mod->modname, mod->filename);	}	list_add_tail(&mod->list, list);}/* Compare len chars of a to b, with _ and - equivalent. */static int modname_equal(const char *a, const char *b, unsigned int len){	unsigned int i;	if (strlen(b) != len)		return 0;	for (i = 0; i < len; i++) {		if ((a[i] == '_' || a[i] == '-')		    && (b[i] == '_' || b[i] == '-'))			continue;		if (a[i] != b[i])			return 0;	}	return 1;}/* Fills in list of modules if this is the line we want. */static int add_modules_dep_line(char *line,				const char *name,				struct list_head *list){	char *ptr;	int len;	char *modname;	/* Ignore lines without : or which start with a # */	ptr = index(line, ':');	if (ptr == NULL || line[strspn(line, "\t ")] == '#')		return 0;	/* Is this the module we are looking for? */	*ptr = '\0';	if (strrchr(line, '/'))		modname = strrchr(line, '/') + 1;	else		modname = line;	len = strlen(modname);	if (strchr(modname, '.'))		len = strchr(modname, '.') - modname;	if (!modname_equal(modname, name, len))		return 0;	/* Create the list. */	add_module(line, ptr - line, list);	ptr++;	for(;;) {		char *dep_start;		ptr += strspn(ptr, " \t");		if (*ptr == '\0')			break;		dep_start = ptr;		ptr += strcspn(ptr, " \t");		add_module(dep_start, ptr - dep_start, list);	}	return 1;}static void read_depends(const char *dirname,			 const char *start_name,			 struct list_head *list){	char *modules_dep_name;	char *line;	FILE *modules_dep;	int done = 0;	asprintf(&modules_dep_name, "%s/%s", dirname, "modules.dep");	modules_dep = fopen(modules_dep_name, "r");	if (!modules_dep)		fatal("Could not load %s: %s\n",		      modules_dep_name, strerror(errno));	/* Stop at first line, as we can have duplicates (eg. symlinks           from boot/ */	while (!done && (line = getline_wrapped(modules_dep, NULL)) != NULL) {		done = add_modules_dep_line(line, start_name, list);		free(line);	}	fclose(modules_dep);	free(modules_dep_name);}/* We use error numbers in a loose translation... */static const char *insert_moderror(int err){	switch (err) {	case ENOEXEC:		return "Invalid module format";	case ENOENT:		return "Unknown symbol in module, or unknown parameter (see dmesg)";	case ENOSYS:		return "Kernel does not have module support";	default:		return strerror(err);	}}static const char *remove_moderror(int err){	switch (err) {	case ENOENT:		return "No such module";	case ENOSYS:		return "Kernel does not have module unloading support";	default:		return strerror(err);	}}/* Is module in /proc/modules?  If so, fill in usecount if not NULL.    0 means no, 1 means yes, -1 means unknown. */static int module_in_kernel(const char *modname, int *usecount){	FILE *proc_modules;	char *line;	/* Might not be mounted yet.  Don't fail. */	proc_modules = fopen("/proc/modules", "r");	if (!proc_modules)		return -1;	while ((line = getline_wrapped(proc_modules, NULL)) != NULL) {		char *entry = strtok(line, " \n");		if (entry && strcmp(entry, modname) == 0) {			/* If it exists, usecount is the third entry. */			if (usecount) {				entry = strtok(NULL, " \n");				if (entry				    && (entry = strtok(NULL, " \n")) != NULL)					*usecount = atoi(entry);			}			free(line);			fclose(proc_modules);			return 1;		}		free(line);	}	fclose(proc_modules);	return 0;}static void replace_modname(struct module *module,			    void *mem, unsigned long len,			    const char *oldname, const char *newname){	char *p;	/* 64 - sizeof(unsigned long) - 1 */	if (strlen(newname) > 55)		fatal("New name %s is too long\n", newname);	/* Find where it is in the module structure.  Don't assume layout! */	for (p = mem; p < (char *)mem + len - strlen(oldname); p++) {		if (memcmp(p, oldname, strlen(oldname)) == 0) {			strcpy(p, newname);			return;		}	}	warn("Could not find old name in %s to replace!\n", module->filename);}static void *get_section32(void *file,			   unsigned long size,			   const char *name,			   unsigned long *secsize){	Elf32_Ehdr *hdr = file;	Elf32_Shdr *sechdrs = file + hdr->e_shoff;	const char *secnames;	unsigned int i;	/* Too short? */	if (size < sizeof(*hdr))		return NULL;	if (size < hdr->e_shoff + hdr->e_shnum * sizeof(sechdrs[0]))		return NULL;	if (size < sechdrs[hdr->e_shstrndx].sh_offset)		return NULL;			secnames = file + sechdrs[hdr->e_shstrndx].sh_offset;	for (i = 1; i < hdr->e_shnum; i++)		if (strcmp(secnames + sechdrs[i].sh_name, name) == 0) {			*secsize = sechdrs[i].sh_size;			return file + sechdrs[i].sh_offset;		}	return NULL;}static void *get_section64(void *file,			   unsigned long size,			   const char *name,			   unsigned long *secsize){	Elf64_Ehdr *hdr = file;	Elf64_Shdr *sechdrs = file + hdr->e_shoff;	const char *secnames;	unsigned int i;	/* Too short? */	if (size < sizeof(*hdr))		return NULL;	if (size < hdr->e_shoff + hdr->e_shnum * sizeof(sechdrs[0]))		return NULL;	if (size < sechdrs[hdr->e_shstrndx].sh_offset)		return NULL;			secnames = file + sechdrs[hdr->e_shstrndx].sh_offset;	for (i = 1; i < hdr->e_shnum; i++)		if (strcmp(secnames + sechdrs[i].sh_name, name) == 0) {			*secsize = sechdrs[i].sh_size;			return file + sechdrs[i].sh_offset;		}	return NULL;}static int elf_ident(void *mod, unsigned long size){	/* "\177ELF" <byte> where byte = 001 for 32-bit, 002 for 64 */	char *ident = mod;	if (size < EI_CLASS || memcmp(mod, ELFMAG, SELFMAG) != 0)		return ELFCLASSNONE;	return ident[EI_CLASS];}static void *get_section(void *file,			 unsigned long size,			 const char *name,			 unsigned long *secsize){	switch (elf_ident(file, size)) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国模娜娜一区二区三区| 一区二区三区久久| 国产二区国产一区在线观看| 2020国产精品自拍| 国产精品18久久久久久久久 | 国产最新精品免费| 久久精品免费在线观看| 成人免费毛片高清视频| 亚洲欧美电影一区二区| 欧美日韩视频专区在线播放| 日本成人中文字幕| 国产喂奶挤奶一区二区三区| 91丨porny丨中文| 午夜精品视频一区| 国产亚洲欧美在线| 97精品久久久午夜一区二区三区| 亚洲国产精品尤物yw在线观看| 7777精品伊人久久久大香线蕉超级流畅 | 成人在线一区二区三区| 亚洲男人的天堂一区二区| 欧美军同video69gay| 国产在线观看一区二区| 亚洲丝袜精品丝袜在线| 欧美一卡二卡三卡四卡| 97se亚洲国产综合自在线 | 亚洲一区二区三区视频在线 | 午夜欧美视频在线观看| 欧美一二三区在线| 成人av电影在线| 丝袜脚交一区二区| 中文无字幕一区二区三区| 欧美色爱综合网| 国产成人亚洲精品青草天美| 亚洲国产精品久久一线不卡| 久久久99免费| 9191国产精品| av亚洲精华国产精华精华| 免费成人在线视频观看| 椎名由奈av一区二区三区| 精品国产一区二区三区久久久蜜月| 91视视频在线直接观看在线看网页在线看| 日韩中文字幕麻豆| 亚洲色图在线播放| 久久久精品一品道一区| 51午夜精品国产| 一本色道**综合亚洲精品蜜桃冫| 国产一区三区三区| 日韩电影在线观看电影| 亚洲精品中文字幕乱码三区| 久久久久国产精品人| 日韩欧美一级在线播放| 欧美综合亚洲图片综合区| 成人18视频日本| 国产精品99久久久久久有的能看| 日韩一区欧美二区| 亚洲国产精品久久一线不卡| 综合久久国产九一剧情麻豆| 国产亚洲欧美日韩日本| 精品久久久久久无| 日韩免费电影网站| 91精品国产入口| 欧美日韩在线电影| 欧美在线免费观看亚洲| 99久久精品国产毛片| 成人激情动漫在线观看| 成人一道本在线| 国产91精品精华液一区二区三区 | 欧美另类变人与禽xxxxx| 日本大香伊一区二区三区| 99久久婷婷国产综合精品| 成人黄色综合网站| 99久久精品免费| 91福利国产精品| 欧美午夜精品电影| 欧美猛男gaygay网站| 欧美日韩亚洲综合| 91精品国产综合久久婷婷香蕉| 欧美精品日韩一区| 欧美大片在线观看| wwww国产精品欧美| 久久久久久**毛片大全| 国产精品黄色在线观看| 亚洲色图在线看| 午夜伊人狠狠久久| 蜜桃传媒麻豆第一区在线观看| 裸体一区二区三区| 国产精品一区久久久久| 国产·精品毛片| 国产成+人+日韩+欧美+亚洲 | 国产一区二区视频在线| 久久99最新地址| 精品一区二区三区欧美| 青青草国产成人av片免费| 久久爱另类一区二区小说| 国产成人精品免费在线| 国产精品一二三四区| 成人一二三区视频| 91在线一区二区三区| 欧美日韩高清在线| 91精品国产色综合久久久蜜香臀| 欧美一区二区视频网站| 欧美xxx久久| 国产精品久久久久桃色tv| 亚洲欧美成人一区二区三区| 一区二区三区国产豹纹内裤在线| 亚洲一区二区在线免费观看视频| 亚洲女厕所小便bbb| 人禽交欧美网站| 成人综合激情网| 91小视频免费看| 欧美日韩一区精品| 日韩精品自拍偷拍| 亚洲精品视频观看| 天堂久久久久va久久久久| 久久精品久久99精品久久| 国产乱子伦视频一区二区三区| 国产91精品一区二区| 在线精品视频免费播放| 91麻豆精品国产91久久久使用方法| 精品成人一区二区三区四区| 国产精品久久久久一区| 亚洲aⅴ怡春院| 成人午夜短视频| 欧美性受xxxx| 久久免费视频一区| 亚洲影视在线观看| 久久99精品国产麻豆婷婷| 国产福利91精品一区| 色综合天天在线| 欧美精品久久99| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲一区二区三区在线看| 国产专区综合网| 在线不卡a资源高清| 亚洲国产成人午夜在线一区| 亚洲国产视频直播| 国产黑丝在线一区二区三区| 在线看日韩精品电影| 91精品黄色片免费大全| 一区二区三区高清不卡| 国内精品伊人久久久久影院对白| 色婷婷激情综合| 日韩精品一区二区三区四区视频 | 国产乱码字幕精品高清av| 春色校园综合激情亚洲| 亚洲精品一区二区三区蜜桃下载| 亚洲欧美激情视频在线观看一区二区三区| 亚洲伦理在线免费看| 国产在线乱码一区二区三区| 欧亚洲嫩模精品一区三区| 日本一区二区高清| 六月婷婷色综合| 欧美精品高清视频| 亚洲曰韩产成在线| 91亚洲精品乱码久久久久久蜜桃| 中文一区一区三区高中清不卡| 日本亚洲欧美天堂免费| 在线观看一区二区精品视频| 国产亚洲成aⅴ人片在线观看| 日本va欧美va欧美va精品| 欧美午夜一区二区三区| 中文字幕一区三区| 99久久夜色精品国产网站| 国产日韩欧美一区二区三区乱码 | 色综合天天综合网天天看片| 日日夜夜精品视频天天综合网| 成人免费三级在线| 国产蜜臀97一区二区三区| 韩国毛片一区二区三区| 日韩免费视频一区二区| 日本不卡高清视频| 欧美日免费三级在线| 亚洲成av人片一区二区梦乃| 色噜噜夜夜夜综合网| 18涩涩午夜精品.www| 成人av午夜影院| 亚洲宅男天堂在线观看无病毒| 99re在线视频这里只有精品| 国产精品国产三级国产普通话三级 | 图片区日韩欧美亚洲| 欧美综合久久久| 亚洲主播在线播放| 欧美日韩在线播放一区| 一区二区三区免费看视频| 91丝袜高跟美女视频| 亚洲六月丁香色婷婷综合久久| 成人黄色软件下载| 亚洲国产高清不卡| 欧美优质美女网站| 无吗不卡中文字幕| 日韩欧美一级二级三级久久久| 午夜视频久久久久久| 精品久久国产字幕高潮| 精品视频一区 二区 三区| 成人夜色视频网站在线观看| 国产一区999| 国产精品一级黄| 免费在线观看视频一区| 亚洲欧美色综合| 亚洲猫色日本管|