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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? main.c

?? Linux下的系統(tǒng)信息獲取
?? C
字號:
/* Copyright (C) 2000-2001 Fujitsu Siemens Computers   Joachim Braeuer   This file is part of smbios   smbios 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.   smbios 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 smbios; see the file COPYING. If not, write to the   Free Software Foundation, Inc., 59 Temple Place - Suite 330,   Boston, MA 02111-1307, USA.*//* $Log: main.c,v $/* Revision 1.1  2001/09/15 14:52:43  bretthauert/* initial release/* *//** \file main.c *  kernel interface functions for smbios kernel module * *  \author Markus Lyra *  \author Thomas Bretthauer *  \date October 2000 *  \version 0.1 */#ifndef __KERNEL__#  define __KERNEL__#endif#ifndef MODULE#  define MODULE#endif#define __NO_VERSION__		/* don't define kernel_verion in module.h */#include <linux/module.h>#include <linux/version.h>char kernel_version[] = UTS_RELEASE;#include <linux/kernel.h>	/* printk() */#include <linux/errno.h>	/* error codes */#include <linux/types.h>	/* size_t */#include <linux/proc_fs.h>#include <asm/io.h>		    /* ioremap() */#include "strgdef.h"        /* holds all the interpreted/cooked string definitions */#include "bios.h"		    /* local definitions */EXPORT_NO_SYMBOLS;/* *   Module stuff *//** \fn int init_module (void) *  \brief module initialization *  \return 0 if successful initialization, an error code otherwise * *  \author Markus Lyra *  \author Thomas Bretthauer *  \author Joachim Braeuer *  \date Januar 2001 */intinit_module (void){    int err = 0;    PDEBUG ("starting module initialization\n");    /*     *  map the SMBIOS memory segment     *     *  ioremap (kernel) maps a physical address to a virtual address.     *  bios start address is e.g. the Bios F-Segment     */    if (!(smbios_base = ioremap (BIOS_START_ADDRESS, BIOS_MAP_LENGTH)))    {        PDEBUG ("ioremap() for entry point failed\n");        err = -ENXIO;        goto ioremap_for_entry_point_failed;    }    PDEBUG ("BIOS base set to 0x%p\n", smbios_base);    /*     *   search for SM-BIOS or DMI-BIOS entry point	 *			 * 	smbios_base holds the virtual starting address of the F-Segment.	 *  first check for the smbios entry point. only if we can't find it	 *	we look for the proprietary dmi bios entry point. This is a entry	 *  point defined by Siemens Nixdorf before the 'real' interface has	 *  been introduced.     */	/* smbios/dmibios_entry_point points to the beginning of the entry point     * table. However, they are of different structure (real - proprietary)     */    if (!(smbios_entry_point = smbios_find_entry_point (smbios_base)))    {        PDEBUG ("SM-BIOS entry point not found\n");        if (!(dmibios_entry_point = dmibios_find_entry_point (smbios_base)))        {	        PDEBUG ("DMI-BIOS entry point not found. Aborting...\n");	        err = -ENXIO;	        goto find_entry_point_failed;        }    }    /*     *  for SM-BIOS:     *  check if Pointer to DMI structures exist.     *  intermediate_string (_DMI_) is not '\0' terminated,     *  so strncmp() with sizeof(DMI_STRING) - 1 is needed.     */    if (smbios_entry_point)    {        if (strncmp((char *) &(smbios_entry_point->intermediate_string),						DMI_STRING, sizeof (DMI_STRING) - 1))		{	        PDEBUG ("Pointer to DMI structures not found!\n");	        err = -ENXIO;	        goto check_dmi_failed;        }    }    /*     *  map the SM-BIOS structures physical address range.	 *  the 'real' smbios_structures_base contains the starting	 *  address, where the instances of dmi structures are located.     */    if (smbios_entry_point)    {        if (!(smbios_structures_base =	          ioremap (smbios_entry_point->struct_table_address,		        (unsigned long) smbios_entry_point->struct_table_length)))		{	        PDEBUG ("ioremap() for structures table failed\n");	        err = -ENXIO;	        goto ioremap_for_structures_table_failed;        }    }    /*     * On the other hand, if we have the proprietary DMI Bios, smbios_structures_base	 * contains a pointer to a table. This table contains an offset to the sm/dmi bios     * structures for each single instance.     */    if (dmibios_entry_point)    {        if (!(smbios_structures_base = dmibios_entry_point->entry))        {	        PDEBUG ("invalid structure table entry%p,%p\n", smbios_structures_base,		        dmibios_entry_point->entry);	        err = -ENXIO;	        goto ioremap_for_structures_table_failed;        }    }    PDEBUG ("DMI structures base set to 0x%p\n", smbios_structures_base);	/*	 * assumption: we have one single pointer that points to the beginning of the     * smbios/dmibios structures regardless what kind of bios we have.     * (except DMIBios 2.0 - the interface we use was introduced with DMIBios 2.1)     */    /*     *  create /proc entries     */    /* make /proc/smbios directory */    if (!(smbios_proc_dir =	       create_proc_entry (PROC_DIR_STRING, S_IFDIR, &proc_root)))	{        err = -ENOMEM;        PDEBUG ("failed to create /proc/smbios directory entry\n");        goto create_smbios_dir_failed;    }    PDEBUG ("/proc/smbios directory created.\n");       /* make /proc/smbios/raw directory */    if (!(smbios_raw_proc_dir =				 create_proc_entry (PROC_DIR_STRING_RAW, S_IFDIR, smbios_proc_dir)))	{        err = -ENOMEM;        PDEBUG ("failed to create /proc/smbios/raw directory entry\n");        goto create_smbios_raw_dir_failed;    }    PDEBUG ("/proc/smbios/raw directory created.\n");    /* make /proc/smbios/cooked directory */    if (!(smbios_cooked_proc_dir =				 create_proc_entry (PROC_DIR_STRING_COOKED, S_IFDIR, smbios_proc_dir)))    {        err = -ENOMEM;		PDEBUG ("failed to create /proc/smbios/cooked directory entry\n");		goto create_smbios_cooked_dir_failed;    }    PDEBUG ("/proc/smbios/cooked directory created.\n");    /* create version file */    if (smbios_entry_point)    {        if ((err = smbios_make_version_entry (smbios_proc_dir)))	        goto smbios_make_version_entry_failed;    }   /* make raw files for SM-BIOS */   if (smbios_entry_point)   {        if ((err = smbios_make_dir_entries (smbios_proc_dir, smbios_raw_proc_dir, smbios_cooked_proc_dir)))	        goto make_smbios_dir_entries_failed;   }	   /* make files for DMI-BIOS */   if (dmibios_entry_point)   {        if ((err = dmibios_make_dir_entries (smbios_proc_dir, smbios_raw_proc_dir, smbios_cooked_proc_dir)))	        goto make_smbios_dir_entries_failed;   }	   PDEBUG ("module loaded succesfully\n");   return 0;/* * reached only if an error occured... * * whenever we need/create system resources and we run into an error, we clean up * in the oposite direction. Sample: * * allocate resource 1, 2, 3, 4, ... * error occurs * clean up resources ..., 4, 3, 2, 1 * * the code above jumps into the correct position of the cleanup chain. */make_smbios_dir_entries_failed:    /* remove /proc/smbios/cooked files */    smbios_destroy_dir_entries (smbios_cooked_proc_dir);    /* remove /proc/smbios/raw files */    smbios_destroy_dir_entries (smbios_raw_proc_dir);    /* remove /proc/smbios files */    smbios_destroy_dir_entries (smbios_proc_dir);	smbios_make_version_entry_failed:    /* remove /proc/smbios/cooked directory */    remove_proc_entry(PROC_DIR_STRING_COOKED, smbios_proc_dir);	create_smbios_cooked_dir_failed	:    /* remove /proc/smbios/raw directory */    remove_proc_entry(PROC_DIR_STRING_RAW, smbios_proc_dir);create_smbios_raw_dir_failed:    /* remove /proc/smbios directory */    remove_proc_entry(PROC_DIR_STRING, &proc_root);	create_smbios_dir_failed:    /* unmap the virtual to physical memory binding */    if (smbios_entry_point)        iounmap (smbios_structures_base);ioremap_for_structures_table_failed:check_dmi_failed:find_entry_point_failed:    /* unmap the virtual to physical memory binding */    iounmap (smbios_base);ioremap_for_entry_point_failed:    return err;}/** \fn int cleanup_module (void) *  \brief module cleanup * *  \author Markus Lyra *  \author Thomas Bretthauer *  \date October 2000 */voidcleanup_module (void){    /* remove /proc/smbios/cooked files */    smbios_destroy_dir_entries (smbios_cooked_proc_dir);    /* remove /proc/smbios/raw files */    smbios_destroy_dir_entries (smbios_raw_proc_dir);    /* remove /proc/smbios files */    smbios_destroy_dir_entries (smbios_proc_dir);	    /* remove /proc/smbios/cooked directory */    remove_proc_entry(PROC_DIR_STRING_COOKED, smbios_proc_dir);    /* remove /proc/smbios/raw directory */    remove_proc_entry(PROC_DIR_STRING_RAW, smbios_proc_dir);    /* remove /proc/smbios directory */    remove_proc_entry(PROC_DIR_STRING, &proc_root);	    /* unmap the virtual to physical memory binding */    if (smbios_entry_point)        iounmap (smbios_structures_base);    /* unmap the virtual to physical memory binding */    iounmap (smbios_base);    PDEBUG ("module unloaded\n");}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久久久网| 国产精品美女久久久久久久久 | 91精品婷婷国产综合久久竹菊| 国产亚洲一区二区三区在线观看| 亚洲在线免费播放| 国产一区高清在线| 欧美三级日本三级少妇99| 中文字幕不卡在线观看| 久久精品噜噜噜成人88aⅴ | 不卡在线视频中文字幕| 日韩精品一区二区三区老鸭窝| 亚洲私人黄色宅男| 大桥未久av一区二区三区中文| 欧美一区二区成人6969| 亚欧色一区w666天堂| 一本色道久久综合精品竹菊| 国产欧美日韩亚州综合 | 99精品国产一区二区三区不卡| 日韩视频在线永久播放| 亚洲bdsm女犯bdsm网站| 97久久人人超碰| 国产精品免费人成网站| 国产一区二区三区精品欧美日韩一区二区三区 | 精品在线一区二区| 在线播放中文一区| 日日噜噜夜夜狠狠视频欧美人| 欧洲激情一区二区| 亚洲人成在线观看一区二区| 成人av集中营| 国产精品美女一区二区| 菠萝蜜视频在线观看一区| 国产喷白浆一区二区三区| 豆国产96在线|亚洲| 国产精品色在线观看| 成人免费视频一区二区| 欧美国产乱子伦| 不卡的av中国片| 亚洲三级在线免费观看| 91麻豆免费观看| 亚洲欧美日韩中文字幕一区二区三区| 91色综合久久久久婷婷| 亚洲免费观看高清完整版在线| 色综合色综合色综合| 亚洲精品国产成人久久av盗摄 | 日韩亚洲欧美中文三级| 免费av网站大全久久| 精品久久久久久久久久久久包黑料 | 日韩欧美的一区| 国产一区视频在线看| 国产精品久久久99| 91久久精品网| 麻豆成人在线观看| 国产人成一区二区三区影院| 色综合色综合色综合| 青青草原综合久久大伊人精品优势| 欧美一区二区三区四区五区 | 欧美日韩激情一区二区| 麻豆免费精品视频| 中文在线资源观看网站视频免费不卡| 97久久精品人人爽人人爽蜜臀 | 国产精品一级片| 中文字幕色av一区二区三区| 欧美性色黄大片| 国产一区二区按摩在线观看| 日韩美女精品在线| 欧美久久久久久蜜桃| 国内偷窥港台综合视频在线播放| 中文字幕一区二区三区不卡 | 欧美日韩电影在线| 精品一区二区免费| 亚洲九九爱视频| 日韩精品一区二区三区在线| 色综合网色综合| 韩国v欧美v日本v亚洲v| 一区二区三区毛片| 久久久久一区二区三区四区| 欧美日韩卡一卡二| jiyouzz国产精品久久| 日本中文字幕一区二区有限公司| 国产人妖乱国产精品人妖| 欧美日本国产视频| 91香蕉视频mp4| 国产一区二区三区在线观看免费 | 亚洲大片在线观看| 中文字幕精品一区二区三区精品 | 国产精品久久久久一区| 欧美久久久影院| 99视频国产精品| 国产一区二区导航在线播放| 亚洲 欧美综合在线网络| 国产精品高清亚洲| 久久久久久久综合日本| 欧美一区二区高清| 欧美系列一区二区| 99re这里都是精品| 粉嫩aⅴ一区二区三区四区五区| 看片网站欧美日韩| 美女一区二区三区在线观看| 亚洲永久免费av| 亚洲男人的天堂一区二区| 国产精品五月天| 久久久精品综合| 国产亚洲精品aa午夜观看| 日韩欧美一级二级三级久久久| 在线精品视频免费播放| 91丨porny丨蝌蚪视频| 国产v日产∨综合v精品视频| 国产一区二区三区在线观看免费| 麻豆精品视频在线| 蜜臀av性久久久久av蜜臀妖精| 午夜天堂影视香蕉久久| 香蕉加勒比综合久久| 亚洲国产精品影院| 五月婷婷另类国产| 丝袜亚洲另类欧美综合| 午夜精品久久久久久久久久| 亚洲国产精品久久艾草纯爱| 午夜精品久久久久久久蜜桃app| 日日夜夜免费精品| 另类综合日韩欧美亚洲| 久久国产视频网| 国产盗摄一区二区| 成人av在线影院| 一本大道久久a久久精二百| 91成人国产精品| 91超碰这里只有精品国产| 欧美一区二区性放荡片| 精品国产sm最大网站免费看| 久久只精品国产| 中文字幕一区视频| 亚洲中国最大av网站| 免费在线看成人av| 国产成人免费视频一区| av电影一区二区| 欧美日韩二区三区| 久久久蜜桃精品| 亚洲夂夂婷婷色拍ww47| 九九精品一区二区| 91香蕉视频污在线| 日韩欧美国产三级| 中文久久乱码一区二区| 亚洲美女在线一区| 蜜桃精品视频在线观看| 国产精品香蕉一区二区三区| 91在线国产观看| 欧美一区永久视频免费观看| www一区二区| 一区二区三区国产| 激情综合网激情| 91国产免费观看| 久久久久久一级片| 亚洲成av人影院在线观看网| 精品一区二区精品| 色94色欧美sute亚洲13| 精品国产一区二区精华 | 欧美激情中文字幕| 亚洲一级二级三级| 国产精一区二区三区| 91福利在线观看| 久久精品夜色噜噜亚洲a∨| 一区二区三区四区蜜桃| 国产一区二区三区四区五区美女 | 久久99国产乱子伦精品免费| 波多野结衣中文字幕一区二区三区 | 色综合久久综合| 精品久久久久久无| 午夜精品久久久久久久99樱桃| 国产mv日韩mv欧美| 欧美mv和日韩mv的网站| 亚洲综合自拍偷拍| 国产69精品久久99不卡| 日韩一级在线观看| 亚洲自拍偷拍九九九| 成人一区二区在线观看| 欧美一区二区视频免费观看| 一区二区三区四区国产精品| 国产成人啪免费观看软件| 日韩欧美在线不卡| 天天操天天干天天综合网| 色综合久久99| 中文字幕中文字幕在线一区| 国产在线精品免费| 日韩视频不卡中文| 日韩电影在线观看一区| 在线一区二区三区做爰视频网站| 国产精品网站在线播放| 国内精品伊人久久久久影院对白| 欧美久久久久免费| 日韩二区三区四区| 欧美一区二区三区四区视频| 亚洲一区二区在线视频| 91激情五月电影| 亚洲一区二区三区中文字幕| 91亚洲男人天堂| 亚洲乱码日产精品bd| 色哟哟一区二区在线观看| 综合激情成人伊人| 色婷婷综合久久久久中文| 亚洲精品美腿丝袜| 色诱视频网站一区|