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

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

?? tests.c

?? 操作系統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 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产普通话蜜臀 | 国产欧美精品在线观看| 精品一区二区三区香蕉蜜桃| 欧美精品一区二区三区蜜桃视频| 国内精品免费在线观看| 国产亚洲精品aa午夜观看| a4yy欧美一区二区三区| 亚洲一区在线观看网站| 日韩一卡二卡三卡四卡| 国内外成人在线| 日韩一区中文字幕| 欧美精品久久天天躁| 精品伊人久久久久7777人| 国产精品久久久久久久久免费丝袜| 色综合久久综合网| 美美哒免费高清在线观看视频一区二区| 精品日韩在线观看| 色哟哟国产精品免费观看| 强制捆绑调教一区二区| 中文文精品字幕一区二区| 欧美三级资源在线| 国产一区二三区| 一区二区三区日本| 国产日韩欧美在线一区| 91小视频免费看| 蜜臀精品久久久久久蜜臀 | 粉嫩一区二区三区在线看| 成人欧美一区二区三区黑人麻豆| 欧美日韩免费在线视频| 国产精品一区二区久久精品爱涩| ●精品国产综合乱码久久久久| 欧美人牲a欧美精品| 国产精品一区二区你懂的| 亚洲自拍另类综合| 国产日韩欧美高清在线| 欧美日韩一区二区在线观看视频| 国产成人综合视频| 日韩福利视频网| 日韩毛片高清在线播放| 精品久久久久99| 色婷婷亚洲婷婷| 国产不卡免费视频| 美女诱惑一区二区| 亚洲国产视频a| 国产精品久久久久久一区二区三区| 欧美一个色资源| 在线观看欧美精品| 91在线一区二区三区| 国产乱子伦视频一区二区三区| 视频一区在线播放| 亚洲精品免费在线| 中文字幕一区二区三区在线不卡| 精品国产乱码久久久久久图片| 欧美日韩日日摸| 91农村精品一区二区在线| 床上的激情91.| 国内一区二区在线| 久久99精品国产麻豆婷婷 | 亚洲精品国产视频| 国产精品麻豆视频| 久久精品网站免费观看| 7777精品伊人久久久大香线蕉超级流畅 | 一区二区国产视频| 亚洲精品亚洲人成人网| 亚洲人123区| 自拍偷拍亚洲欧美日韩| 中文字幕亚洲一区二区av在线| 中文字幕欧美日韩一区| 中文字幕免费在线观看视频一区| 欧美精品一区二区在线观看| 欧美精品一区二区三区蜜桃| 精品久久久久久久人人人人传媒| 日韩欧美成人一区二区| 日韩一级片网站| 日韩欧美一二区| 精品美女一区二区| 久久久精品影视| 欧美极品少妇xxxxⅹ高跟鞋 | 欧美日韩在线综合| 在线免费av一区| 精品精品国产高清a毛片牛牛| jlzzjlzz国产精品久久| 暴力调教一区二区三区| 91丝袜美腿高跟国产极品老师| 91亚洲永久精品| 欧美日韩在线观看一区二区 | 日韩一区二区在线看| 欧美一区二区啪啪| 日韩欧美成人激情| www国产精品av| 欧美国产视频在线| 亚洲欧美日本在线| 亚洲一区二区三区在线播放| 性做久久久久久久免费看| 蜜桃在线一区二区三区| 国产呦萝稀缺另类资源| 成人晚上爱看视频| 欧美性大战xxxxx久久久| 制服丝袜亚洲播放| 国产婷婷精品av在线| 最新欧美精品一区二区三区| 亚洲成人av免费| 久久精品国产精品亚洲精品| 成人性视频网站| 欧美在线视频日韩| 日韩欧美一区中文| 国产精品天天看| 亚洲h精品动漫在线观看| 国产一区二三区好的| 色噜噜夜夜夜综合网| 精品久久久久久久久久久久久久久久久| 久久久精品影视| 一区二区三区高清不卡| 久久精品国产免费| 一本久久综合亚洲鲁鲁五月天 | 国产一区免费电影| 色香色香欲天天天影视综合网| 欧美一区二区三区免费观看视频 | 久久久精品人体av艺术| 一区二区三区四区乱视频| 久久成人精品无人区| 色综合激情五月| 久久综合色鬼综合色| 亚洲午夜影视影院在线观看| 国产馆精品极品| 欧美一区二区在线观看| 亚洲素人一区二区| 国产在线麻豆精品观看| 欧美日韩色综合| 成人欧美一区二区三区黑人麻豆| 精品中文字幕一区二区| 欧美天天综合网| 中文在线资源观看网站视频免费不卡| 偷拍与自拍一区| 色婷婷香蕉在线一区二区| 欧美激情中文字幕| 麻豆国产一区二区| 欧美人成免费网站| 亚洲精品ww久久久久久p站| 国产91精品久久久久久久网曝门 | 欧美在线高清视频| 中文成人av在线| 国产成人自拍网| 精品欧美久久久| 日本网站在线观看一区二区三区| 91啦中文在线观看| 中文字幕成人av| 国产超碰在线一区| 久久久99久久精品欧美| 美国十次综合导航| 久久久精品中文字幕麻豆发布| 偷窥少妇高潮呻吟av久久免费| 色综合久久久久综合体| 亚洲视频狠狠干| 99久久精品国产观看| 国产精品不卡在线观看| 菠萝蜜视频在线观看一区| 久久婷婷国产综合国色天香| 激情成人综合网| 精品国产制服丝袜高跟| 久久疯狂做爰流白浆xx| 精品国产第一区二区三区观看体验 | 国产精品久久久久久久久快鸭| 国产大片一区二区| 国产欧美一区二区精品性色超碰| 国产乱子伦一区二区三区国色天香| 欧美电影免费观看高清完整版 | 色诱视频网站一区| 亚洲色图视频网站| 在线亚洲一区二区| 亚洲一级在线观看| 欧美一区二区视频在线观看 | 一本久道久久综合中文字幕| 亚洲色图欧美偷拍| 欧美伊人精品成人久久综合97| 亚洲一区国产视频| 69成人精品免费视频| 麻豆久久一区二区| 久久久久青草大香线综合精品| 国产成人一区二区精品非洲| 日本一区二区久久| 一本到三区不卡视频| 性做久久久久久久免费看| 日韩精品一区二| 成人综合在线观看| 亚洲一区二区av在线| 欧美精三区欧美精三区| 韩国视频一区二区| 国产精品青草综合久久久久99| 日本高清不卡aⅴ免费网站| 午夜精品爽啪视频| 久久久午夜精品理论片中文字幕| aaa亚洲精品| 视频一区视频二区在线观看| 久久久久久久久99精品| 91网站黄www| 老色鬼精品视频在线观看播放| 国产精品久久看| 在线综合视频播放| 懂色中文一区二区在线播放|