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

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

?? tests.c

?? 操作系統(tǒng)SunOS 4.1.3版本的源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
#ifndef	lintstatic	char sccsid[] = "@(#)tests.c 1.1 92/07/30 Copyright Sun Micro";#endif/* * Copyright (c) 1987 by Sun Microsystems, Inc. */#include "sundiag.h"#include <sys/fcntl.h>#include <sys/ioctl.h>#include <sys/file.h>#include <sys/param.h>#include <sys/stat.h>#include <sys/wait.h>#include <sys/resource.h>#include <signal.h>#include <sun/fbio.h>#include <vfork.h>#include "../../lib/include/libonline.h"#include "../../lib/include/probe_sundiag.h"#include "struct.h"#include "procs.h"#include "sundiag_ats.h"#include "sundiag_msg.h"#ifndef	sun386#include <sys/mtio.h>#else#include "mtio.h"#endif#define MAX_ARG		17		/* max. # of arg's for child + 2 */#define	GROUP_COL	1		/* group toggle starting column */#define	SEL_COL		4		/* test select toggle starting column */#define	OPT_COL		32		/* option panel item starting column */#define	FB_WAIT		30/* seconds to be wait before restart the frame buffer tests */struct	test_info	*tests[MAXTESTS];	/* test's data base */int	exist_tests=0;			/* total # of existing tests */char	*cpuname;			/* CPU type of the tested machine */char    *vmem_waittime[] = {"0","5","10","15","30","60","90","random"};int	vmem_wait=0;			/* vmem wait time counter */int	fb_delay=0;   /* # of seconds to be delayed between fb tests */char	*sp_src= "0,1,3,5,8,9,b,d";	/* default ALM loopback source */char	*sp_des= "7,2,4,6,f,a,c,e";	/* default ALM loopback destination */char	*sp2_src= "0,2,4,6,8,a,c,e";	/* default ALM2 loopback source */char	*sp2_des= "1,3,5,7,9,b,d,f";	/* default ALM2 loopback destination */char	*scsisp_src= "0,2";	/* default SCSI serial port loopback source */char	*scsisp_des= "1,3";/* default SCSI serial port loopback destination */char	*sunlink_src[]=		/* default SunLink loopback source */	{"0,2","4,6","8,10","12,14"};char	*sunlink_des[]=		/* default SunLink loopback destination */	{"1,3","5,7","9,11","13,15"};char    *bpp_mode[] = {"fast", "medium", "extended"};char    *lpvi_mode[] = {"fast", "medium", "extended"};char    *lpvi_image[] = {"default", "57fonts", "u_image"};char    *lpvi_resolution[] = {"400", "300"};Frame	option_frame=NULL;	/* used to keep the frame of the option popup */int	taac=0;			/* flag for whether a taac board or not */int	zebra=0;		/* flag for whether a zebra board or not */FILE	*conf_fp;extern	select_test();			/* forward external declaration */extern	Panel	init_opt_panel();	/* declared in option.c */extern	frame_destroy_proc();		/* declared in panelprocs.c */extern	char	*malloc();extern	char	*strtok();extern	char	*strcpy();extern	char	*strcat();extern	char	*sprintf();extern	char	*mktemp();extern	FILE	*fopen();extern	char	*getenv();extern	multi_tests();		/* forward declaration */extern	Pixrect	*pr_open();extern	Pixrect	*start_button, *reset_button;		/* defined in panel.c */extern	char	*remotehost;extern	int	config_file_only;	/* defined in sundiag.c */char	toni_msg[82];static	char	*child_arg[MAX_ARG];	/* argument array of pointers */static	int	start_row=7;	/* beginning row of the test selection items */static	int	ipcs=0;		/* keep # of IPC's */static	int	gp2=0;		/* flag for whether there is GP2 board */static	int	cg2=0;		/* flag for whether there is CG2 board */static	int	cg4=0;		/* flag for whether there is CG4 board */static	int	cg5=0;		/* flag for whether there is CG5 board */static  int     cg12=0;		/* flag for whether there is CG12 board */ static  int	gttest=0;	/* flag for whether there is GT board */static	int	ibis=0;		/* flag for whether there is IBIS board */static	int	fb_inuse=0;   /* flag to tell whether frame buffer is in use */static	int	fb_id= -1;    /* to keep track of who is using the fb */static	int	dcp_kernel[4]={0,0,0,0}; /* dcp kernel(ucode) been loaded? */static	int	mcp_flag[8]={0,0,0,0,0,0,0,0};				/* up to 8 mcp boards in a machine */static	int	net_flag=0;		 /* only run one nettest at a time */static	int	next_net=0;		 /* only run one nettest at a time */static	int	last_group;		 /* the group id of lastly-run test *//****************************************************************************** * check_dblbuf(), returns TRUE if the frame device is double buffered.       * *	This code was extracted from cg5test.c.				      * * Note: this function(checking double frame buffer) should be moved to probe.* ******************************************************************************/static	int	check_dblbuf(){  Pixrect *prfd;  struct  fbtype  fb_type;  int tmpfd;  /* first test for console type */  if ((tmpfd=open("/dev/fb", O_RDONLY)) != -1)  {    (void)ioctl(tmpfd, FBIOGTYPE, &fb_type);    (void)close(tmpfd);  }  else    return(FALSE);  /* check if cg driver is there */  if (access("/dev/cgtwo0", 0) == 0)  {    /* first check if going through gp2 */    if (fb_type.fb_type == FBTYPE_SUN2GP )    {	if (access("/dev/gpone0a", 0) == 0)	{	  if ((prfd=pr_open("/dev/gpone0a")) == (Pixrect *)0)	    return(FALSE);	}	else	  return(FALSE);    }    else if (fb_type.fb_type == FBTYPE_SUN2COLOR)    {	if ((prfd=pr_open("/dev/fb")) == (Pixrect *)0)	  return(FALSE);    }    else    {	if ((prfd=pr_open("/dev/cgtwo0")) == (Pixrect *)0)	  return(FALSE);    }    /* We have a device.  Check for single or double buffer */    (void)pr_dbl_set(prfd, PR_DBL_WRITE, PR_DBL_B, 0);    (void)pr_put(prfd, 0, 0, 0x55);    (void)pr_dbl_set(prfd, PR_DBL_WRITE, PR_DBL_A, 0);    (void)pr_put(prfd, 0, 0, 0xAA);    (void)pr_dbl_set(prfd, PR_DBL_READ, PR_DBL_B, 0);    if (pr_get(prfd, 0, 0) == 0x55)    {	(void)pr_dbl_set(prfd, PR_DBL_DISPLAY, PR_DBL_A,		   	PR_DBL_READ, PR_DBL_A, PR_DBL_WRITE, PR_DBL_BOTH, 0);	(void)pr_destroy(prfd);	return(TRUE);    }    else      (void)pr_dbl_set(prfd, PR_DBL_DISPLAY, PR_DBL_A,		   	PR_DBL_READ, PR_DBL_A, PR_DBL_WRITE, PR_DBL_BOTH, 0);    (void)pr_destroy(prfd);  }  return(FALSE);}/****************************************************************************** * check_probe() checks the device name againt the test data base to determine* * which test should be run on this device.				      * * Input: dev_ptr, the info. regarding the found device.		      * * Output: the test no; -1 if no test supports this device.		      * ******************************************************************************/static int	check_probe(dev_ptr)struct found_dev	*dev_ptr;{  int	i;  if (dev_ptr->unit > 0)		/* if 2nd(and higher) device */  {    if (strcmp(dev_ptr->device_name, "ie") == 0) return(ENET2);	/* at most 2 ethernet boards!! */    if (strcmp(dev_ptr->device_name, "zs") == 0)    {      if (dev_ptr->unit == 2)		/* zs3 is dummy */	return(CPU_SP1);		/* ttyc and ttyd */      else if (dev_ptr->unit == 4)	/* zs5 is dummy */	return(SCSISP2);      else	return(-1);			/* not implemented yet */    }  }  for (i=0; i != TEST_NO; ++i)    if (strcmp(dev_ptr->device_name, tests_base[i].devname) == 0)    {      if (i == GP)			/* check whether it is CG2 */      {	if (dev_ptr->u_tag.uval.devinfo.status == 2) return(GP2);      }      else if (i == COLOR2)		/* check whether it's double buffered */      {	if (check_dblbuf()) return(COLOR5);      }      else if (i == FPA)		/* check for fpa-3x board */      {        if (dev_ptr->u_tag.uval.devinfo.status == FPA3X_EXIST) return(FPA3X);      }      else if (i == FPUTEST)      {	if (dev_ptr->u_tag.uval.devinfo.status == FPU2_EXIST) return(FPU2);      }      return(i);    }  return(-1);}/****************************************************************************** * make_test() creates a test information data structure to be inserted into  * * the tests[].								      * * Input: test_no, test number; unit, device unit number.		      * * Output: a pointer to created data structure.				      * ******************************************************************************/static struct test_info	*make_test(test_no, unit)int	test_no;		/* test no(index to tests_base[]) */int	unit;			/* device unit number */{  struct test_info *tmp;    if (unit != 0)		/* if multiple devices */    {      if (tests_base[test_no].unit == -1)      /* devices with single unit, but with a non-zero UNIX device number */      {	tests_base[test_no].unit = unit;   /* change the unit number here */	return(&tests_base[test_no]);      }      tmp = (struct test_info *)malloc(sizeof(struct test_info));      bcopy((char *)(&tests_base[test_no]), (char *)tmp,						sizeof(struct test_info));      tmp->unit = unit;      tmp->devname = malloc((unsigned)strlen(tmp->devname)+5);      (void)strcpy(tmp->devname, tests_base[test_no].devname);    }    else      tmp = &tests_base[test_no];    return(tmp);}/****************************************************************************** * build_user_test(), appends the user-defined tests at the end of the test   * * data structure, tests[].						      * * Input: global test data structure, tests[].				      *  * Output: None, but the test data structure, tests[],  will be modified.     * ******************************************************************************/build_user_tests(){  FILE	*user_fp;  int	i, k;  struct test_info *tmp;  char	buff[82], *temp;  char	*param[21];		/* max. to 20 tokens(plus one to store NULL) */  char	*delimit;  if ((user_fp=fopen(USER_FILE, "r")) == NULL) return;  k = 0;			/* initialize the user-defined test number */  while (fgets(buff, 81, user_fp) != NULL)  {    if (buff[0] == '#') continue;	/* skip comment */        i = 0;    delimit = ",\n";    if ((temp=strtok(buff, delimit)) != NULL)    {      do      {	param[i++] = temp;		/* parse out the tokens */	if (i == 2)	  delimit = "\n";		/* ignore the comma from here */      }      while ((temp=strtok((char *)NULL, delimit)) != NULL && i < 20);      param[i] = NULL;    }    if (i < 2) continue;		/* format error, skipped for now */    tmp = (struct test_info *)malloc(sizeof(struct test_info));    (void)bcopy((char *)(&tests_base[USER]), (char *)tmp,						sizeof(struct test_info));    temp = malloc((unsigned)strlen(tmp->devname)+5);    (void)sprintf(temp, "%s%d", tmp->devname, k);    tmp->devname = temp;		/* get the device name, userx */    temp = malloc((unsigned)strlen(param[0])+5);    (void)strcpy(temp, param[0]);	/* get the label */    tmp->label = temp;    temp = malloc((unsigned)strlen(param[1])+2);    (void)strcpy(temp, param[1]);	/* get the testname */    while (*temp == ' ' || *temp == '\t') ++temp;	/* skip white spaces */    tmp->testname = temp;    if (i > 2)				/* there are command tails */    {      temp = malloc((unsigned)strlen(param[2])+2);      (void)strcpy(temp, param[2]);	/* ignore the rest of parameters */      tmp->env = temp;    }    tests[exist_tests++] = tmp;    ++k;  }  (void)fclose(user_fp);}/****************************************************************************** * Initilaize the test's data base according to whatever the probing routine  * * discovered.								      * * Input: f_dev_ptr, pointer to the table of information regarding the	      * *	  "found" device(built by probing routine).			      * * Output: None.							      * *									      * * Note: The found devices will also be sorted by the group.		      * ******************************************************************************/init_tests(f_dev_ptr)struct f_devs *f_dev_ptr;		/* info. of found devices */{  int	i, j, k, temp, test_no;  char	*tmp, buff[82];  struct found_dev	*dev_ptr;  struct test_info	*tmp_tests[MAXTESTS];	/* temporary array */  int	already_log=0;  last_group = ngroups - 1;  if (!ats_nohost || config_file_only == TRUE)    if ((conf_fp=fopen(conf_file, "w")) == NULL)    {      (void)fprintf(stderr, "Sundiag: Can't open %s", conf_file);      sundiag_exit(1);    }  cpuname = malloc((unsigned)strlen(f_dev_ptr->cpuname)+2);  (void)strcpy(cpuname, f_dev_ptr->cpuname);   if (!ats_nohost || config_file_only == TRUE)    (void)fprintf(conf_fp, "cpu	\"%s\"\n", cpuname);  exist_tests = f_dev_ptr->num;  dev_ptr = f_dev_ptr->found_dev;  for (i=0, j= -1; i < exist_tests; ++i)  {    if ((test_no=check_probe(dev_ptr)) != -1)    {      tmp_tests[++j] = make_test(test_no, dev_ptr->unit);      /* copy the device information into test's data base */      tmp_tests[j]->conf = (struct u_tag *)malloc(sizeof(struct u_tag));      bcopy((char *)(&(dev_ptr->u_tag)), (char *)(tmp_tests[j]->conf),							sizeof(struct u_tag));      if (dev_ptr->u_tag.utype == DISK_DEV)      {	tmp = malloc((unsigned)strlen(dev_ptr->u_tag.uval.diskinfo.ctlr)+2);	(void)strcpy(tmp, dev_ptr->u_tag.uval.diskinfo.ctlr);	tmp_tests[j]->conf->uval.diskinfo.ctlr = tmp;      }      else if (dev_ptr->u_tag.utype == TAPE_DEV)      	{	  tmp = malloc((unsigned)strlen(dev_ptr->u_tag.uval.tapeinfo.ctlr)+2);	  (void)strcpy(tmp, dev_ptr->u_tag.uval.tapeinfo.ctlr);	  tmp_tests[j]->conf->uval.tapeinfo.ctlr = tmp;        }      switch (tmp_tests[j]->id)      {	case AUDIO:          if ( dev_ptr->u_tag.uval.devinfo.status == 1 )          {          tmp_tests[j]->type = 2;          tmp_tests[j]->enable = DISABLE;          tmp_tests[j]->data = (caddr_t)0x40;          tmp_tests[j]->testname = "audbri";          tmp_tests[j]->special = (caddr_t)0;          }          break;        case PMEM:        case VMEM:	  temp = dev_ptr->u_tag.uval.meminfo.amt/1024;	  if (dev_ptr->u_tag.uval.meminfo.amt%1024 > 0)  	    ++temp; 	  tmp_tests[j]->conf->uval.meminfo.amt = temp;	/* save it */	  if (!ats_nohost || config_file_only == TRUE)	  {	    (void)fprintf(conf_fp, "%s\t%d MB\n", tmp_tests[j]->devname, temp);	    already_log = 1;	  }	  break;        case SCSIDISK1:        case XYDISK1:        case XDDISK1:        case IPIDISK1:	case IDDISK1:	case SFDISK1:	case OBFDISK1:	  temp = dev_ptr->u_tag.uval.diskinfo.amt;	/* in the unit of MB */	  if (!ats_nohost || config_file_only == TRUE)	  {	    if (tmp_tests[j]->id != IDDISK1)	      (void)fprintf(conf_fp, "%s%d\t%d MB\n", tmp_tests[j]->devname,						tmp_tests[j]->unit, temp);	    else	      (void)fprintf(conf_fp, "%s%03x\t%d MB\n", tmp_tests[j]->devname,						tmp_tests[j]->unit, temp);	    already_log = 1;	  }	  /* Make sure the default rawtest option runs only one copy */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷丁香激情综合| 欧美影院精品一区| 韩国女主播成人在线观看| 亚洲成人激情社区| 亚洲精品你懂的| 亚洲人吸女人奶水| 亚洲免费视频成人| 一区二区在线看| 一区二区三区影院| 亚洲一区二区三区精品在线| 亚洲一区二区三区中文字幕在线| 亚洲综合在线第一页| 一区二区欧美国产| 日韩在线一区二区三区| 婷婷开心激情综合| 免费人成网站在线观看欧美高清| 蜜臀国产一区二区三区在线播放| 蜜桃精品在线观看| 精品一区二区三区免费毛片爱| 看电影不卡的网站| 国产精品白丝jk白祙喷水网站| 国产传媒日韩欧美成人| www.av精品| 欧美日韩你懂得| 欧美一级午夜免费电影| 精品久久五月天| 国产精品国模大尺度视频| 亚洲精品国产第一综合99久久| 亚洲一区二三区| 蜜臀国产一区二区三区在线播放| 极品美女销魂一区二区三区| 成人午夜在线视频| 欧美日韩精品一区二区在线播放 | 日韩午夜在线观看| 久久久亚洲精品一区二区三区| 中文字幕免费在线观看视频一区| 日韩美女视频一区二区| 天天av天天翘天天综合网| 极品尤物av久久免费看| 91视频免费播放| 欧美一区二区福利在线| 欧美韩国一区二区| 亚洲成人精品在线观看| 国产精品一区二区久久不卡| 91国产丝袜在线播放| 久久久蜜桃精品| 亚洲一区二区偷拍精品| 国产精品456露脸| 欧美日韩一区二区三区免费看| 欧美精品一区二区高清在线观看| 日韩一区有码在线| 九一九一国产精品| 91丝袜高跟美女视频| 欧美变态tickle挠乳网站| 亚洲欧洲制服丝袜| 黄页网站大全一区二区| 91久久线看在观草草青青| 欧美精品一区二区三区一线天视频| 亚洲精品国产精华液| 国产精品99久| 6080yy午夜一二三区久久| 国产精品成人一区二区艾草| 久久精品国产一区二区三 | 欧美成人综合网站| 1区2区3区国产精品| 九九视频精品免费| 欧美日韩一区二区三区免费看| 久久先锋影音av鲁色资源网| 亚洲一区二区不卡免费| 粉嫩av一区二区三区在线播放| 制服.丝袜.亚洲.中文.综合| 亚洲欧美在线视频观看| 国产一区二区三区在线观看免费| 欧美在线视频日韩| 亚洲色图视频网| 丁香激情综合国产| 久久夜色精品一区| 日精品一区二区三区| 色屁屁一区二区| 国产精品萝li| 国产精品一级二级三级| 日韩欧美一级二级三级久久久| 亚洲一级二级三级在线免费观看| av一区二区不卡| 欧美国产日韩一二三区| 美女在线视频一区| 51精品秘密在线观看| 亚洲桃色在线一区| 成人av网址在线观看| 中文在线资源观看网站视频免费不卡| 另类人妖一区二区av| 欧美日韩性生活| 一区二区日韩电影| 一本到不卡免费一区二区| 国产精品美女久久福利网站 | 日韩欧美在线123| 偷拍日韩校园综合在线| 欧美午夜一区二区| 亚洲自拍偷拍欧美| 欧洲一区二区三区免费视频| 亚洲欧洲一区二区在线播放| 成人在线视频首页| 国产欧美精品日韩区二区麻豆天美| 韩国一区二区在线观看| 精品久久久久久久久久久久久久久 | 亚洲成a人v欧美综合天堂| 色婷婷综合久色| 亚洲综合一二三区| 精品国产一区二区亚洲人成毛片| 高潮精品一区videoshd| 色偷偷一区二区三区| 亚洲日本一区二区| 色婷婷久久99综合精品jk白丝 | 日本三级韩国三级欧美三级| 91精品国产综合久久小美女| 三级亚洲高清视频| 欧美videos中文字幕| 国产精品亚洲成人| 中文字幕在线不卡| 在线欧美日韩国产| 日本欧美加勒比视频| 精品区一区二区| 福利91精品一区二区三区| 亚洲欧美国产毛片在线| 欧美日韩三级视频| 久久精品久久精品| 中文无字幕一区二区三区| 91在线视频免费观看| 亚洲成va人在线观看| 日韩一级片在线播放| 精品夜夜嗨av一区二区三区| 中文字幕av不卡| 欧美三级电影网| 久久国产精品露脸对白| 国产精品久久免费看| 欧美情侣在线播放| 国产精品99久久久久久久女警| 亚洲欧美偷拍三级| 欧美一区二区三区免费在线看| 国内精品伊人久久久久av影院 | 国产一区二区成人久久免费影院 | 亚洲一区二区三区在线| 欧美一区中文字幕| 国产v日产∨综合v精品视频| 亚洲一区欧美一区| 欧美精品一区二区高清在线观看| 99精品视频在线观看免费| 午夜免费欧美电影| 国产欧美综合在线| 欧美日韩国产在线观看| 成人一区二区三区在线观看| 亚洲va国产va欧美va观看| 国产日韩精品一区二区三区| 欧美日韩免费观看一区三区| 国产精品伊人色| 亚洲一区二区三区在线播放| 国产午夜三级一区二区三| 欧美日韩中字一区| 国产91精品精华液一区二区三区| 香港成人在线视频| 国产精品久久久99| 精品三级av在线| 在线免费不卡视频| 国产成人丝袜美腿| 日韩黄色免费电影| 亚洲免费观看在线观看| 精品国产99国产精品| 欧美三区免费完整视频在线观看| 国产精品一区二区在线观看不卡 | 欧美曰成人黄网| 国产高清无密码一区二区三区| 亚洲午夜av在线| 国产精品久久久久毛片软件| 欧美一级一区二区| 欧美日韩一级片网站| www.视频一区| 国产一区三区三区| 日一区二区三区| 亚洲夂夂婷婷色拍ww47| 国产精品久久久久久久久果冻传媒| 欧美一区二区久久| 在线观看日韩高清av| www.日韩av| 国产不卡视频在线观看| 激情国产一区二区| 日本不卡在线视频| 午夜激情一区二区| 一区二区三区成人在线视频| 中文字幕一区三区| 中文字幕av一区 二区| 久久久久久麻豆| ww亚洲ww在线观看国产| 欧美第一区第二区| 欧美一区二区三区视频免费播放| 欧美日韩一级片网站| 欧美性一区二区| 在线看国产日韩| 欧美综合一区二区| 日本道在线观看一区二区| 一本一道波多野结衣一区二区|