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

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

?? bootlib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* bootLib.c - boot ROM subroutine library *//* Copyright 1995-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------02v,13mar02,jkf  Fixing SPR#74251, using bootLib.h macros for array sizes                  instead of numeric constants.  Changed copyright to 2002.02u,30mar99,jdi  doc: corrected misspelling of NOMANUAL which caused		    bootScanNum() to publish.02t,28mar99,jdi  doc: fixed tiny formatting errors in .iP section.02s,14mar99,jdi  doc: removed refs to config.h and/or configAll.h (SPR 25663).02r,04feb99,dbt  when bootParamsShow() routine is called without any                 parameter, print an error message (Fixed SPR #24885).02q,26aug97,spm  modified bootLeaseExtract to allow improved treatment of DHCP                  address information by startup routines02p,27nov96,spm  added DHCP client and support for network device unit numbers.02p,12sep97,dgp  doc: fix SPR 5330 boot line has required parameters02o,19jun96,dbt  fixed spr 6691. Modified function promptParamString in order		 to take into account the size of the field to read		 Modified promptRead to read the entire string even if it is 		 too long. This is to empty the reception buffer of the		 standard input.		 Update copyright.02n,14oct95,jdi  doc: revised pathnames for Tornado.02m,16feb95,jdi  doc format corrections.02l,12jan93,jdi  fixed poor style in bootParamsPrompt().02k,20jan93,jdi  documentation cleanup for 5.1.02j,28jul92,rdc  made bootStructToString write enable memory before writing.02i,26may92,rrr  the tree shuffle02h,01mar92,elh  changed printParamNum to take an int param (instead of char).02g,05dec91,rrr  shut up some ansi warnings.02f,19nov91,rrr  shut up some ansi warnings.02e,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice02d,30apr91,jdi	 documentation tweak.02c,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.02b,24mar91,jaa	 documentation.02a,15jul90,dnw  added "targetName", "startupScript", and "other" fields		 replaced bootParamsToString() with bootStructToString()		 replaced bootStringToParams() with bootStringToStruct()		 changed to initialize procNum to 0 instead of NONE		 routines accept and generate boot strings w/o host & filename		   (required for bootp)		 removed clearFlag from promptParamString - now all fields		   can be cleared		 promptParamNum now accepts "." to be clear (0)		 added bootParamsErrorPrint01r,10jul90,dnw  lint clean-up, esp to allow void to be void one day		 fixed incorrect declaration of promptParamString() &		   promptParamNum(); was void, now int		   declared to return int instead of void		 changed name of scanNum() to bootScanNum() to not conflict		   with routine in fioLib.c01q,02jan90,dab  fixed bootStringsToParams() bug in parsing vbnum value.		 disabled clearing of boot device, host name, or boot file		   fields.01p,23may89,dnw  made promptRead be LOCAL.01o,20aug88,gae  documentation01n,30may88,dnw  changed to v4 names.01m,29may88,dnw  changed calls to atoi() to sscanf().01l,28may88,dnw  moved skipSpace here from fioLib.		 changed calls to fioStdIn to STD_IN.		 made promptParam...() LOCAL again (copies in nfsLib now).01k,19apr88,llk  made promptParamNum and promptParamString global routines.01j,19feb88,dnw  added bootExtractNetmask().01i,18nov87,ecs  lint.		 added include of strLib.h.		 documentation.01h,15nov87,dnw  changed to print '?' for unprintable chars in parameters.01g,06nov87,jlf  documentation01f,13oct87,dnw  added flags field to boot line encoding and decoding.01e,09oct87,jlf  changed to deal with new ISI boot format with ethernet adrs.01d,14may87,rdc  procnum can now be defined by a line VBNUM=n or VB=n for	   +dnw    compatability with isi bootproms.		 changed prompt to indicate password is for ftp only.		 fixed bootEncodeParams() to add EOS.01c,23mar87,jlf  documentation.		 changed routine names to meet naming conventions.01b,20dec86,dnw  added promptBootParams().		 changed to not get include files from default directories.01a,18dec86,llk  created.*//*DESCRIPTIONThis library contains routines for manipulating a boot line.Routines are provided to interpret, construct, print, and prompt fora boot line.When VxWorks is first booted, certain parameters can be specified,such as network addresses, boot device, host, and start-up file.This information is encoded into a single ASCII string known as the boot line.The boot line is placed at a known address (specified in config.h)by the boot ROMs so that the system being booted can discover the parametersthat were used to boot the system.The boot line is the only means of communication from the boot ROMs tothe booted system.The boot line is of the form:.CSbootdev(unitnum,procnum)hostname:filename e=# b=# h=# g=# u=userid pw=passwd f=#tn=targetname s=startupscript o=other.CEwhere:.iP <bootdev> 12the boot device (required); for example, "ex" for Excelan Ethernet, "bp" for backplane.  For the backplane, this field can have an optional anchoraddress specification of the form "bp=<adrs>" (see bootBpAnchorExtract())..iP <unitnum>the unit number of the boot device (0..n)..iP <procnum>the processor number on the backplane, 0..n (required for VME boards)..iP <hostname>the name of the boot host (required)..iP <filename>the file to be booted (required)..iP "e" "" 3the Internet address of the Ethernet interface.This field can have an optional subnet maskof the form <inet_adrs>:<subnet_mask>. If DHCPis used to obtain the configuration parameters,lease timing information may also be present.This information takes the form <lease_duration>:<lease_origin>and is appended to the end of the field.(see bootNetmaskExtract() and bootLeaseExtract())..iP "b"the Internet address of the backplane interface.This field can have an optional subnet maskand/or lease timing information as "e"..iP "h"the Internet address of the boot host..iP "g"the Internet address of the gateway to the boot host.Leave this parameter blank if the host is on same network..iP "u"a valid user name on the boot host..iP "pw"the password for the user on the host.This parameter is usually left blank.If specified, FTP is used for file transfers..iP "f"the system-dependent configuration flags.This parameter contains an `or' of option bits defined insysLib.h..iP "tn"the name of the system being booted.iP "s"the name of a file to be executed as a start-up script..iP "o""other" string for use by the application..LPThe Internet addresses are specified in "dot" notation (e.g., 90.0.0.2).The order of assigned values is arbitrary.EXAMPLE.CSenp(0,0)host:/usr/wpwr/target/config/mz7122/vxWorks e=90.0.0.2 b=91.0.0.2 h=100.0.0.4    g=90.0.0.3 u=bob pw=realtime f=2 tn=target s=host:/usr/bob/startup o=any_string.CEINCLUDE FILES: bootLib.hSEE ALSO: bootConfig*//* LINTLIBRARY */#include "vxWorks.h"#include "ctype.h"#include "string.h"#include "sysLib.h"#include "bootLib.h"#include "stdio.h"#include "fioLib.h"#include "private/vmLibP.h"#include "taskLib.h"/* macros that fill in size parameter */#define GET_WORD(pp, field, delims)	\	getWord (pp, field, sizeof (field), delims)#define GET_ASSIGN(pp, name, field)	\	getAssign (pp, name, field, sizeof (field))#define PARAM_PRINT_WIDTH	21LOCAL char strBootDevice []		= "boot device";LOCAL char strHostName []		= "host name";LOCAL char strTargetName []		= "target name (tn)";LOCAL char strFileName []		= "file name";LOCAL char strInetOnEthernet []		= "inet on ethernet (e)";LOCAL char strInetOnBackplane []	= "inet on backplane (b)";LOCAL char strHostInet []		= "host inet (h)";LOCAL char strGatewayInet []		= "gateway inet (g)";LOCAL char strUser []			= "user (u)";LOCAL char strFtpPw []			= "ftp password (pw)";LOCAL char strFtpPwLong []		= "ftp password (pw) (blank = use rsh)";LOCAL char strUnitNum []                = "unit number";LOCAL char strProcNum []		= "processor number";LOCAL char strFlags []			= "flags (f)";LOCAL char strStartup []		= "startup script (s)";LOCAL char strOther []			= "other (o)";/* forward static functions */static STATUS bootSubfieldExtract (char *string, int *pValue, char		delimeter);static void addAssignNum (char *string, char *code, int value);static void addAssignString (char *string, char *code, char *value);static BOOL getWord (char ** ppString, char *pWord, int length, char *delim);static BOOL getConst (char ** ppString, char *pConst);static BOOL getNum (char ** ppString, int *pNum);static BOOL getAssign (char ** ppString, char *valName, char *pVal, int		maxLen);static BOOL getAssignNum (char ** ppString, char *valName, int *pVal);static void printClear (char *param);static void printParamNum (char *paramName, int value, BOOL hex);static void printParamString (char *paramName, char *param);static int promptParamBootDevice (char *paramName, char *param, int *pValue,                              int sizeParamName);static int promptParamString (char *paramName, char *param, int sizeParamName);static int promptParamNum (char *paramName, int *pValue, BOOL hex);static int promptRead (char *buf, int bufLen);static void skipSpace (char ** strptr);/********************************************************************************* bootStringToStruct - interpret the boot parameters from the boot line** This routine parses the ASCII string and returns the values into* the provided parameters.** For a description of the format of the boot line, see the manual entry * for bootLib ** RETURNS:* A pointer to the last character successfully parsed plus one* (points to EOS, if OK).  The entire boot line is parsed.*/char *bootStringToStruct    (    char *bootString,   		/* boot line to be parsed */    FAST BOOT_PARAMS *pBootParams	/* where to return parsed boot line */    )    {    char *p1 = bootString;    char *p1Save;    char *p2;    char hostAndFile [BOOT_HOST_LEN + BOOT_FILE_LEN];    /* initialize boot parameters */    bzero ((char *) pBootParams, sizeof (*pBootParams));    /* get boot device and proc num */    if (!GET_WORD  (&p1, pBootParams->bootDev, " \t(")	||	!getConst (&p1, "(")				||	!getNum   (&p1, &pBootParams->unitNum)		||	!getConst (&p1, ",")				||	!getNum   (&p1, &pBootParams->procNum)		||	!getConst (&p1, ")"))	{	return (p1);	}    /* get host name and boot file, if present */    p1Save = p1;    GET_WORD  (&p1, hostAndFile, " \t");    if (index (hostAndFile, ':') != NULL)	{	p2 = hostAndFile;	GET_WORD  (&p2, pBootParams->hostName, ":");	getConst (&p2, ":");	GET_WORD  (&p2, pBootParams->bootFile, " \t");	}    else	p1 = p1Save;    /* get optional assignments */    while (skipSpace (&p1), (*p1 != EOS))	{	if (!GET_ASSIGN (&p1, "ead", pBootParams->ead) &&	    !GET_ASSIGN (&p1, "e",   pBootParams->ead) &&	    !GET_ASSIGN (&p1, "bad", pBootParams->bad) &&	    !GET_ASSIGN (&p1, "b",   pBootParams->bad) &&	    !GET_ASSIGN (&p1, "had", pBootParams->had) &&	    !GET_ASSIGN (&p1, "h",   pBootParams->had) &&	    !GET_ASSIGN (&p1, "gad", pBootParams->gad) &&	    !GET_ASSIGN (&p1, "g",   pBootParams->gad) &&	    !GET_ASSIGN (&p1, "usr", pBootParams->usr) &&	    !GET_ASSIGN (&p1, "u",   pBootParams->usr) &&	    !GET_ASSIGN (&p1, "pw",  pBootParams->passwd) &&	    !GET_ASSIGN (&p1, "o",   pBootParams->other) &&	    !GET_ASSIGN (&p1, "tn",  pBootParams->targetName) &&	    !GET_ASSIGN (&p1, "hn",  pBootParams->hostName) &&	    !GET_ASSIGN (&p1, "fn",  pBootParams->bootFile) &&	    !GET_ASSIGN (&p1, "s",  pBootParams->startupScript) &&	    !getAssignNum (&p1, "n", &pBootParams->procNum) &&	    !getAssignNum (&p1, "f", &pBootParams->flags))	    {	    break;	    }	}    return (p1);    }/********************************************************************************* bootStructToString - construct a boot line** This routine encodes a boot line using the specified boot parameters.** For a description of the format of the boot line, see the manual * entry for bootLib.** RETURNS: OK.*/STATUS bootStructToString    (    char *paramString,    	    /* where to return the encoded boot line */    FAST BOOT_PARAMS *pBootParams   /* boot line structure to be encoded */    )    {    UINT state;    BOOL writeProtected = FALSE;    int pageSize = 0;    char *pageAddr = NULL;    /* see if we need to write enable the memory */    if (vmLibInfo.vmLibInstalled)	{	pageSize = VM_PAGE_SIZE_GET();	pageAddr = (char *) ((UINT) paramString / pageSize * pageSize);	if (VM_STATE_GET (NULL, (void *) pageAddr, &state) != ERROR)	    if ((state & VM_STATE_MASK_WRITABLE) == VM_STATE_WRITABLE_NOT)		{		writeProtected = TRUE;		TASK_SAFE();		VM_STATE_SET (NULL, pageAddr, pageSize, VM_STATE_MASK_WRITABLE,			      VM_STATE_WRITABLE);		}	}    if ((pBootParams->hostName[0] == EOS) && (pBootParams->bootFile[0] == EOS))	sprintf (paramString, "%s(%d,%d)", pBootParams->bootDev,		 pBootParams->unitNum, pBootParams->procNum);    else	sprintf (paramString, "%s(%d,%d)%s:%s", pBootParams->bootDev,		 pBootParams->unitNum, pBootParams->procNum,                  pBootParams->hostName, pBootParams->bootFile);    addAssignString (paramString, "e", pBootParams->ead);    addAssignString (paramString, "b", pBootParams->bad);    addAssignString (paramString, "h", pBootParams->had);    addAssignString (paramString, "g", pBootParams->gad);    addAssignString (paramString, "u", pBootParams->usr);    addAssignString (paramString, "pw", pBootParams->passwd);    addAssignNum (paramString, "f", pBootParams->flags);    addAssignString (paramString, "tn", pBootParams->targetName);    addAssignString (paramString, "s", pBootParams->startupScript);    addAssignString (paramString, "o", pBootParams->other);    if (writeProtected)	{	VM_STATE_SET (NULL, pageAddr, pageSize, 		      VM_STATE_MASK_WRITABLE, VM_STATE_WRITABLE_NOT);	TASK_UNSAFE();	}    return (OK);    }/********************************************************************************* bootParamsShow - display boot line parameters** This routine displays the boot parameters in the specified boot string* one parameter per line.** RETURNS: N/A*/void bootParamsShow    (    char *paramString           /* boot parameter string */    )    {    BOOT_PARAMS bootParams;    char *pS;    if (paramString == NULL)    	{	printf ("No boot parameter string specified.\n");	return;	}    pS = bootStringToStruct (paramString, &bootParams);    if (*pS != EOS)	{	bootParamsErrorPrint (paramString, pS);	return;	}    printf ("\n");    printParamString (strBootDevice, bootParams.bootDev);    printParamNum (strUnitNum, bootParams.unitNum, FALSE);    printParamNum (strProcNum, bootParams.procNum, FALSE);    printParamString (strHostName, bootParams.hostName);    printParamString (strFileName, bootParams.bootFile);    printParamString (strInetOnEthernet, bootParams.ead);    printParamString (strInetOnBackplane, bootParams.bad);    printParamString (strHostInet, bootParams.had);    printParamString (strGatewayInet, bootParams.gad);    printParamString (strUser, bootParams.usr);    printParamString (strFtpPw, bootParams.passwd);    printParamNum (strFlags, bootParams.flags, TRUE);    printParamString (strTargetName, bootParams.targetName);    printParamString (strStartup, bootParams.startupScript);    printParamString (strOther, bootParams.other);    printf ("\n");    }/********************************************************************************* bootParamsPrompt - prompt for boot line parameters

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2017欧美狠狠色| 自拍av一区二区三区| 99精品国产视频| 99久久精品国产网站| 欧美一级国产精品| 亚洲美女视频在线| 国产91综合一区在线观看| 91麻豆精品国产91久久久使用方法| 久久精品视频一区二区| 免费观看日韩av| 欧美三片在线视频观看| 国产精品视频线看| 国产精品综合一区二区三区| 91精品国产综合久久久蜜臀粉嫩 | 亚洲精品国产高清久久伦理二区| 极品美女销魂一区二区三区| 欧美日韩视频专区在线播放| 亚洲精品一二三| 成人av资源在线观看| 国产调教视频一区| 国产永久精品大片wwwapp| 91精品午夜视频| 日韩精品五月天| 欧美久久一区二区| 日韩专区一卡二卡| 欧美男同性恋视频网站| 亚洲大片免费看| 欧美日本视频在线| 日本伊人色综合网| 91精品国产麻豆| 青青草视频一区| 欧美电影精品一区二区 | 综合久久国产九一剧情麻豆| 成人深夜在线观看| 国产精品久久久久影视| 91免费在线看| 亚洲成人1区2区| 欧美一区二区三区在线电影| 日韩电影在线看| 日韩欧美色综合网站| 精品综合免费视频观看| 久久久99免费| gogo大胆日本视频一区| 一区二区三区在线影院| 欧美四级电影在线观看| 人禽交欧美网站| 久久综合国产精品| av在线免费不卡| 亚洲精品成人精品456| 欧美日韩你懂得| 久久99国产精品麻豆| 国产片一区二区三区| 一本大道久久a久久综合婷婷| 一区二区国产视频| 日韩精品一区二区三区视频播放 | 成人欧美一区二区三区小说| jlzzjlzz亚洲日本少妇| 国产精品国产自产拍高清av| 色天使色偷偷av一区二区| 亚洲图片欧美视频| 精品久久久久久亚洲综合网| 成人一区二区三区在线观看| 亚洲成人免费电影| www国产精品av| 在线亚洲一区观看| 美女免费视频一区| 中文字幕中文在线不卡住| 制服.丝袜.亚洲.中文.综合| 国产一区二区三区免费看| 亚洲另类在线视频| 精品999久久久| 色猫猫国产区一区二在线视频| 日本最新不卡在线| 亚洲色图制服丝袜| 久久综合九色综合欧美亚洲| 欧美亚洲综合在线| 国产综合色视频| 亚洲电影在线播放| 国产精品久久久久天堂| 日韩欧美国产高清| 欧美视频一区二区三区| 成人久久久精品乱码一区二区三区| 亚洲成人免费视| 亚洲三级电影网站| 欧美激情一区二区三区全黄| 欧美精品一二三区| 99久久久国产精品| 国产一区二区三区免费看| 性做久久久久久免费观看欧美| 国产精品无人区| 日韩欧美国产电影| 在线综合视频播放| 欧美日韩综合在线| 色播五月激情综合网| 成人美女视频在线看| 国产高清不卡二三区| 久久电影国产免费久久电影| 午夜精品123| 一区二区三区四区视频精品免费 | 久久免费看少妇高潮| 欧美理论片在线| 在线视频中文字幕一区二区| 成人看片黄a免费看在线| 国产经典欧美精品| 国产一区二区三区综合| 久久草av在线| 九一久久久久久| 另类小说欧美激情| 美女一区二区视频| 日产欧产美韩系列久久99| 日日夜夜精品免费视频| 日韩电影在线观看网站| 麻豆91在线看| 久久99国产精品尤物| 久久99精品国产| 国产美女在线观看一区| 国内精品伊人久久久久av影院| 狠狠色丁香婷婷综合久久片| 国产一区在线不卡| 国产一区二区三区免费观看| 国产成人午夜精品5599| 国产成人福利片| 成人精品视频.| 91啪在线观看| 欧美视频日韩视频在线观看| 欧美老人xxxx18| 欧美变态凌虐bdsm| 欧美激情艳妇裸体舞| 国产人久久人人人人爽| 亚洲欧美一区二区三区久本道91| 亚洲女性喷水在线观看一区| 亚洲一卡二卡三卡四卡| 日本在线不卡视频一二三区| 国产在线播放一区二区三区| 成人aa视频在线观看| 欧美日韩综合色| 日韩免费性生活视频播放| 26uuu精品一区二区| 最新日韩在线视频| 日韩av一区二| jiyouzz国产精品久久| 欧美日韩国产大片| 久久久五月婷婷| 亚洲一区二区在线免费看| 美女被吸乳得到大胸91| 国产精品影视网| 在线一区二区视频| 久久综合成人精品亚洲另类欧美| 亚洲三级免费电影| 精品一区二区三区的国产在线播放| 成人在线综合网| 欧美一卡二卡在线| 国产精品久线观看视频| 日韩电影在线一区二区三区| 成人高清视频免费观看| 8v天堂国产在线一区二区| 国产精品免费av| 久久精品国产一区二区三区免费看| youjizz久久| 欧美videos大乳护士334| 一区二区三区成人在线视频| 国产一区美女在线| 欧美日韩精品免费| 综合中文字幕亚洲| 国产精品一区一区三区| 欧美人妇做爰xxxⅹ性高电影| 国产精品日韩精品欧美在线| 三级亚洲高清视频| 91玉足脚交白嫩脚丫在线播放| 日韩欧美一卡二卡| 亚洲第一福利视频在线| 不卡视频在线看| 国产欧美日韩中文久久| 免费在线观看一区| 欧美日韩三级一区| 一区二区三区四区亚洲| 成人午夜电影久久影院| 久久综合中文字幕| 日韩电影一区二区三区四区| 欧美在线啊v一区| 日韩美女视频一区二区| 高清在线不卡av| 久久久久久久综合色一本| 男男视频亚洲欧美| 欧美一区二区三区在线视频| 亚洲一区二区三区三| 色综合久久99| 伊人一区二区三区| 色综合天天综合网天天狠天天| 国产精品国产自产拍高清av王其| 国产精品一区二区黑丝| 欧美精品一区二区三区蜜桃| 极品瑜伽女神91| 欧美成人一区二区三区| 久久精品国产久精国产| 日韩一区二区三区三四区视频在线观看| 亚洲综合久久久久| 欧美色电影在线| 日韩国产欧美三级| 日韩一区二区在线观看视频|