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

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

?? sysctl.c

?? Linux2.4.20針對三星公司的s3c2410開發板的內核改造。
?? C
?? 第 1 頁 / 共 3 頁
字號:
 * ctl_name - This is the numeric sysctl value used by sysctl(2). The number *            must be unique within that level of sysctl * * procname - the name of the sysctl file under /proc/sys. Set to %NULL to not *            enter a sysctl file * * data - a pointer to data for use by proc_handler * * maxlen - the maximum size in bytes of the data * * mode - the file permissions for the /proc/sys file, and for sysctl(2) * * child - a pointer to the child sysctl table if this entry is a directory, or *         %NULL. * * proc_handler - the text handler routine (described below) * * strategy - the strategy routine (described below) * * de - for internal use by the sysctl routines * * extra1, extra2 - extra pointers usable by the proc handler routines * * Leaf nodes in the sysctl tree will be represented by a single file * under /proc; non-leaf nodes will be represented by directories. * * sysctl(2) can automatically manage read and write requests through * the sysctl table.  The data and maxlen fields of the ctl_table * struct enable minimal validation of the values being written to be * performed, and the mode field allows minimal authentication. * * More sophisticated management can be enabled by the provision of a * strategy routine with the table entry.  This will be called before * any automatic read or write of the data is performed. * * The strategy routine may return * * < 0 - Error occurred (error is passed to user process) * * 0   - OK - proceed with automatic read or write. * * > 0 - OK - read or write has been done by the strategy routine, so *       return immediately. * * There must be a proc_handler routine for any terminal nodes * mirrored under /proc/sys (non-terminals are handled by a built-in * directory handler).  Several default handlers are available to * cover common cases - * * proc_dostring(), proc_dointvec(), proc_dointvec_jiffies(), * proc_dointvec_minmax(), proc_doulongvec_ms_jiffies_minmax(), * proc_doulongvec_minmax() * * It is the handler's job to read the input buffer from user memory * and process it. The handler should return 0 on success. * * This routine returns %NULL on a failure to register, and a pointer * to the table header on success. */struct ctl_table_header *register_sysctl_table(ctl_table * table, 					       int insert_at_head){	struct ctl_table_header *tmp;	tmp = kmalloc(sizeof(struct ctl_table_header), GFP_KERNEL);	if (!tmp)		return NULL;	tmp->ctl_table = table;	INIT_LIST_HEAD(&tmp->ctl_entry);	if (insert_at_head)		list_add(&tmp->ctl_entry, &root_table_header.ctl_entry);	else		list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry);#ifdef CONFIG_PROC_FS	register_proc_table(table, proc_sys_root);#endif	return tmp;}/** * unregister_sysctl_table - unregister a sysctl table hierarchy * @header: the header returned from register_sysctl_table * * Unregisters the sysctl table and all children. proc entries may not * actually be removed until they are no longer used by anyone. */void unregister_sysctl_table(struct ctl_table_header * header){	list_del(&header->ctl_entry);#ifdef CONFIG_PROC_FS	unregister_proc_table(header->ctl_table, proc_sys_root);#endif	kfree(header);}/* * /proc/sys support */#ifdef CONFIG_PROC_FS/* Scan the sysctl entries in table and add them all into /proc */static void register_proc_table(ctl_table * table, struct proc_dir_entry *root){	struct proc_dir_entry *de;	int len;	mode_t mode;		for (; table->ctl_name; table++) {		/* Can't do anything without a proc name. */		if (!table->procname)			continue;		/* Maybe we can't do anything with it... */		if (!table->proc_handler && !table->child) {			printk(KERN_WARNING "SYSCTL: Can't register %s\n",				table->procname);			continue;		}		len = strlen(table->procname);		mode = table->mode;		de = NULL;		if (table->proc_handler)			mode |= S_IFREG;		else {			mode |= S_IFDIR;			for (de = root->subdir; de; de = de->next) {				if (proc_match(len, table->procname, de))					break;			}			/* If the subdir exists already, de is non-NULL */		}		if (!de) {			de = create_proc_entry(table->procname, mode, root);			if (!de)				continue;			de->data = (void *) table;			if (table->proc_handler) {				de->proc_fops = &proc_sys_file_operations;				de->proc_iops = &proc_sys_inode_operations;			}		}		table->de = de;		if (de->mode & S_IFDIR)			register_proc_table(table->child, de);	}}/* * Unregister a /proc sysctl table and any subdirectories. */static void unregister_proc_table(ctl_table * table, struct proc_dir_entry *root){	struct proc_dir_entry *de;	for (; table->ctl_name; table++) {		if (!(de = table->de))			continue;		if (de->mode & S_IFDIR) {			if (!table->child) {				printk (KERN_ALERT "Help - malformed sysctl tree on free\n");				continue;			}			unregister_proc_table(table->child, de);			/* Don't unregister directories which still have entries.. */			if (de->subdir)				continue;		}		/* Don't unregister proc entries that are still being used.. */		if (atomic_read(&de->count))			continue;		table->de = NULL;		remove_proc_entry(table->procname, root);	}}static ssize_t do_rw_proc(int write, struct file * file, char * buf,			  size_t count, loff_t *ppos){	int op;	struct proc_dir_entry *de;	struct ctl_table *table;	size_t res;	ssize_t error;		de = (struct proc_dir_entry*) file->f_dentry->d_inode->u.generic_ip;	if (!de || !de->data)		return -ENOTDIR;	table = (struct ctl_table *) de->data;	if (!table || !table->proc_handler)		return -ENOTDIR;	op = (write ? 002 : 004);	if (ctl_perm(table, op))		return -EPERM;		res = count;	/*	 * FIXME: we need to pass on ppos to the handler.	 */	error = (*table->proc_handler) (table, write, file, buf, &res);	if (error)		return error;	return res;}static ssize_t proc_readsys(struct file * file, char * buf,			    size_t count, loff_t *ppos){	return do_rw_proc(0, file, buf, count, ppos);}static ssize_t proc_writesys(struct file * file, const char * buf,			     size_t count, loff_t *ppos){	return do_rw_proc(1, file, (char *) buf, count, ppos);}static int proc_sys_permission(struct inode *inode, int op){	return test_perm(inode->i_mode, op);}/** * proc_dostring - read a string sysctl * @table: the sysctl table * @write: %TRUE if this is a write to the sysctl file * @filp: the file structure * @buffer: the user buffer * @lenp: the size of the user buffer * * Reads/writes a string from/to the user buffer. If the kernel * buffer provided is not large enough to hold the string, the * string is truncated. The copied string is %NULL-terminated. * If the string is being read by the user process, it is copied * and a newline '\n' is added. It is truncated if the buffer is * not large enough. * * Returns 0 on success. */int proc_dostring(ctl_table *table, int write, struct file *filp,		  void *buffer, size_t *lenp){	size_t len;	char *p, c;		if (!table->data || !table->maxlen || !*lenp ||	    (filp->f_pos && !write)) {		*lenp = 0;		return 0;	}		if (write) {		len = 0;		p = buffer;		while (len < *lenp) {			if(get_user(c, p++))				return -EFAULT;			if (c == 0 || c == '\n')				break;			len++;		}		if (len >= table->maxlen)			len = table->maxlen-1;		if(copy_from_user(table->data, buffer, len))			return -EFAULT;		((char *) table->data)[len] = 0;		filp->f_pos += *lenp;	} else {		len = strlen(table->data);		if (len > table->maxlen)			len = table->maxlen;		if (len > *lenp)			len = *lenp;		if (len)			if(copy_to_user(buffer, table->data, len))				return -EFAULT;		if (len < *lenp) {			if(put_user('\n', ((char *) buffer) + len))				return -EFAULT;			len++;		}		*lenp = len;		filp->f_pos += len;	}	return 0;}/* *	Special case of dostring for the UTS structure. This has locks *	to observe. Should this be in kernel/sys.c ???? */ static int proc_doutsstring(ctl_table *table, int write, struct file *filp,		  void *buffer, size_t *lenp){	int r;	if (!write) {		down_read(&uts_sem);		r=proc_dostring(table,0,filp,buffer,lenp);		up_read(&uts_sem);	} else {		down_write(&uts_sem);		r=proc_dostring(table,1,filp,buffer,lenp);		up_write(&uts_sem);	}	return r;}#define OP_SET	0#define OP_AND	1#define OP_OR	2#define OP_MAX	3#define OP_MIN	4static int do_proc_dointvec(ctl_table *table, int write, struct file *filp,		  void *buffer, size_t *lenp, int conv, int op){	int *i, vleft, first=1, neg, val;	size_t left, len;		#define TMPBUFLEN 20	char buf[TMPBUFLEN], *p;		if (!table->data || !table->maxlen || !*lenp ||	    (filp->f_pos && !write)) {		*lenp = 0;		return 0;	}		i = (int *) table->data;	vleft = table->maxlen / sizeof(int);	left = *lenp;		for (; left && vleft--; i++, first=0) {		if (write) {			while (left) {				char c;				if(get_user(c,(char *) buffer))					return -EFAULT;				if (!isspace(c))					break;				left--;				((char *) buffer)++;			}			if (!left)				break;			neg = 0;			len = left;			if (len > TMPBUFLEN-1)				len = TMPBUFLEN-1;			if(copy_from_user(buf, buffer, len))				return -EFAULT;			buf[len] = 0;			p = buf;			if (*p == '-' && left > 1) {				neg = 1;				left--, p++;			}			if (*p < '0' || *p > '9')				break;			val = simple_strtoul(p, &p, 0) * conv;			len = p-buf;			if ((len < left) && *p && !isspace(*p))				break;			if (neg)				val = -val;			buffer += len;			left -= len;			switch(op) {			case OP_SET:	*i = val; break;			case OP_AND:	*i &= val; break;			case OP_OR:	*i |= val; break;			case OP_MAX:	if(*i < val)						*i = val;					break;			case OP_MIN:	if(*i > val)						*i = val;					break;			}		} else {			p = buf;			if (!first)				*p++ = '\t';			sprintf(p, "%d", (*i) / conv);			len = strlen(buf);			if (len > left)				len = left;			if(copy_to_user(buffer, buf, len))				return -EFAULT;			left -= len;			buffer += len;		}	}	if (!write && !first && left) {		if(put_user('\n', (char *) buffer))			return -EFAULT;		left--, buffer++;	}	if (write) {		p = (char *) buffer;		while (left) {			char c;			if(get_user(c, p++))				return -EFAULT;			if (!isspace(c))				break;			left--;		}	}	if (write && first)		return -EINVAL;	*lenp -= left;	filp->f_pos += *lenp;	return 0;}/** * proc_dointvec - read a vector of integers * @table: the sysctl table * @write: %TRUE if this is a write to the sysctl file * @filp: the file structure * @buffer: the user buffer * @lenp: the size of the user buffer * * Reads/writes up to table->maxlen/sizeof(unsigned int) integer * values from/to the user buffer, treated as an ASCII string.  * * Returns 0 on success. */int proc_dointvec(ctl_table *table, int write, struct file *filp,		     void *buffer, size_t *lenp){    return do_proc_dointvec(table,write,filp,buffer,lenp,1,OP_SET);}/* *	init may raise the set. */ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp,			void *buffer, size_t *lenp){	if (!capable(CAP_SYS_MODULE)) {		return -EPERM;	}	return do_proc_dointvec(table,write,filp,buffer,lenp,1,				(current->pid == 1) ? OP_SET : OP_AND);}/** * proc_dointvec_minmax - read a vector of integers with min/max values * @table: the sysctl table * @write: %TRUE if this is a write to the sysctl file * @filp: the file structure * @buffer: the user buffer * @lenp: the size of the user buffer * * Reads/writes up to table->maxlen/sizeof(unsigned int) integer * values from/to the user buffer, treated as an ASCII string. * * This routine will ensure the values are within the range specified by * table->extra1 (min) and table->extra2 (max). * * Returns 0 on success. */int proc_dointvec_minmax(ctl_table *table, int write, struct file *filp,		  void *buffer, size_t *lenp){	int *i, *min, *max, vleft, first=1, neg, val;	size_t len, left;	#define TMPBUFLEN 20	char buf[TMPBUFLEN], *p;		if (!table->data || !table->maxlen || !*lenp ||	    (filp->f_pos && !write)) {		*lenp = 0;		return 0;	}		i = (int *) table->data;	min = (int *) table->extra1;	max = (int *) table->extra2;	vleft = table->maxlen / sizeof(int);	left = *lenp;		for (; left && vleft--; i++, min++, max++, first=0) {		if (write) {			while (left) {				char c;				if(get_user(c, (char *) buffer))					return -EFAULT;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情资源网| 91精品国产综合久久精品| 亚洲精品一区二区三区蜜桃下载| 午夜精品久久久久久久久| 欧美三级视频在线播放| 亚洲高清免费视频| 欧美一级黄色大片| 精品一区二区三区久久| 久久久久久一级片| 成人av中文字幕| 一区二区三区日韩| 91精品国产一区二区三区香蕉| 日本aⅴ亚洲精品中文乱码| 精品人在线二区三区| 岛国av在线一区| 亚洲精品久久嫩草网站秘色| 欧美日韩一级片在线观看| 久久激情综合网| 国产精品久久看| 欧美日韩中文字幕一区二区| 美脚の诱脚舐め脚责91| 国产日产精品1区| 欧美综合一区二区三区| 美女视频一区在线观看| 国产视频一区二区在线| 色成人在线视频| 理论电影国产精品| 亚洲欧美韩国综合色| 欧美一区二区三区免费大片| 国产福利一区二区三区| 亚洲综合小说图片| 久久综合狠狠综合久久激情| 91丨九色丨蝌蚪丨老版| 久草中文综合在线| 一区二区免费在线播放| 欧美精品一区二区蜜臀亚洲| 色综合久久中文综合久久牛| 久久99精品国产麻豆婷婷| 亚洲人成精品久久久久| 精品国产a毛片| 91精品福利在线| 从欧美一区二区三区| 日韩av电影免费观看高清完整版 | 91丝袜美腿高跟国产极品老师| 亚洲欧美另类在线| 久久综合国产精品| 91福利在线免费观看| 精品亚洲成a人| 一区二区三区在线视频免费观看| 51精品视频一区二区三区| 国产剧情一区在线| 香蕉成人啪国产精品视频综合网| 精品免费99久久| 色94色欧美sute亚洲线路一ni| 亚洲日本中文字幕区| 91精品国产欧美一区二区成人| 国产成人高清视频| 视频一区中文字幕国产| 国产精品色婷婷| 日韩精品一区二区三区蜜臀 | 欧美日精品一区视频| 精品一区二区三区在线播放| 中文字幕一区在线观看视频| 欧美一区二区三区精品| 99精品欧美一区二区蜜桃免费 | 成人精品高清在线| 老司机精品视频一区二区三区| 亚洲色图制服丝袜| 久久久久久久久久久久久女国产乱 | 精品日本一线二线三线不卡| 欧美在线一二三四区| 国产乱码精品一品二品| 亚洲国产精品视频| 亚洲视频一二三| 国产三级精品视频| 亚洲激情成人在线| 日本一区二区三级电影在线观看 | 欧美日本在线观看| 972aa.com艺术欧美| 国产一区 二区| 青青国产91久久久久久| 亚洲综合小说图片| 亚洲男女毛片无遮挡| 最新日韩在线视频| 国产精品国产三级国产有无不卡 | 国产在线视视频有精品| 男男gaygay亚洲| 夜夜嗨av一区二区三区中文字幕| 欧美激情一区二区三区四区| 久久久国际精品| 欧美变态tickle挠乳网站| 欧美夫妻性生活| 欧美日韩在线综合| 欧日韩精品视频| 欧美探花视频资源| 欧美在线观看视频一区二区 | 亚洲视频资源在线| 亚洲欧美一区二区三区孕妇| 国产精品久久久久久亚洲伦| 国产欧美精品区一区二区三区| 久久中文字幕电影| 国产日韩一级二级三级| 欧美激情在线一区二区| 国产精品天美传媒沈樵| 久久久不卡网国产精品二区 | 欧美色综合久久| 欧美日韩国产高清一区二区 | 日本va欧美va欧美va精品| 美国一区二区三区在线播放| 日本成人在线视频网站| 青青草精品视频| 久久99久久99精品免视看婷婷| 日本不卡1234视频| 国产在线精品视频| 国产白丝精品91爽爽久久| 成人国产一区二区三区精品| 不卡的看片网站| 91麻豆6部合集magnet| 91久久免费观看| 51午夜精品国产| 久久这里只有精品6| 国产婷婷精品av在线| 日韩伦理免费电影| 亚洲成av人影院| 日韩国产精品大片| 成人激情视频网站| 欧美性色黄大片| 欧美电影精品一区二区| 欧美高清一级片在线观看| 亚洲免费观看高清完整版在线观看 | 久久久蜜桃精品| 中文字幕一区二区三区乱码在线| 亚洲在线观看免费视频| 久久爱另类一区二区小说| 成人aa视频在线观看| 欧美美女一区二区三区| 国产日韩欧美一区二区三区综合| 亚洲一区二区三区四区在线免费观看| 日韩精品欧美精品| 成人福利电影精品一区二区在线观看| 欧美色图12p| 欧美不卡一区二区三区| 综合婷婷亚洲小说| 日本vs亚洲vs韩国一区三区二区 | 午夜精品在线视频一区| 丁香婷婷综合网| 精品视频在线视频| 国产精品色噜噜| 国产在线麻豆精品观看| 欧美在线一区二区三区| 日本一区二区三区在线观看| 日韩av电影一区| 色嗨嗨av一区二区三区| 国产人久久人人人人爽| 麻豆一区二区三| 欧美羞羞免费网站| 综合久久给合久久狠狠狠97色| 五月天视频一区| 国产91精品免费| 国产午夜亚洲精品午夜鲁丝片| 亚洲成a人片综合在线| 97精品久久久午夜一区二区三区| 久久综合九色综合欧美就去吻| 午夜精品成人在线视频| 91国产成人在线| 亚洲欧洲日产国码二区| 国产精品系列在线播放| 日韩欧美一区二区久久婷婷| 一区二区三区在线免费| 成人av第一页| 国产精品全国免费观看高清| 日韩av二区在线播放| 欧美天天综合网| 亚洲精品成a人| 91麻豆文化传媒在线观看| 欧美国产激情二区三区| 国产精品中文字幕日韩精品| 日韩欧美国产一区二区在线播放 | 国产精品二三区| 懂色中文一区二区在线播放| 久久久久国产免费免费| 国产乱码字幕精品高清av | 欧美性猛交xxxx乱大交退制版 | 色成年激情久久综合| 欧美激情资源网| 国产成人在线电影| 国产日产欧美一区二区三区| 大胆亚洲人体视频| 日韩毛片精品高清免费| 一道本成人在线| 亚洲一区二区三区影院| 精品视频一区三区九区| 日韩经典中文字幕一区| 在线看日韩精品电影| 一区二区三区免费| 欧美精品第一页| 九九精品一区二区| 日本一区二区三区高清不卡| av不卡免费在线观看| 亚洲免费三区一区二区|