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

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

?? rf_configure.c

?? RAIDFrame是個非常好的磁盤陣列RAID仿真工具
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Mark Holland * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU *  School of Computer Science *  Carnegie Mellon University *  Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. *//*************************************************************** * * rf_configure.c -- code related to configuring the raidframe system * * configuration is complicated by the fact that we want the same * driver to work both in the kernel and at user level.  In the * kernel, we can't read the configuration file, so we configure * by running a user-level program that reads the config file, * creates a data structure describing the configuration and * passes it into the kernel via an ioctl.  Since we want the config * code to be common between the two versions of the driver, we * configure using the same two-step process when running at * user level.  Of course, at user level, the config structure is * passed directly to the config routine, rather than via ioctl. * * This file is not compiled into the kernel, so we have no * need for KERNEL ifdefs. * **************************************************************//* $Locker:  $ * $Log: rf_configure.c,v $ * Revision 1.42  1996/08/09  18:47:47  jimz * major -> dev_major * * Revision 1.41  1996/07/29  14:05:12  jimz * fix numPUs/numRUs confusion (everything is now numRUs) * clean up some commenting, return values * * Revision 1.40  1996/07/27  23:36:08  jimz * Solaris port of simulator * * Revision 1.39  1996/07/27  18:39:45  jimz * cleanup sweep * * Revision 1.38  1996/07/18  22:57:14  jimz * port simulator to AIX * * Revision 1.37  1996/06/19  14:58:02  jimz * move layout-specific config parsing hooks into RF_LayoutSW_t * table in rf_layout.c * * Revision 1.36  1996/06/17  14:38:33  jimz * properly #if out RF_DEMO code * fix bug in MakeConfig that was causing weird behavior * in configuration routines (config was not zeroed at start) * clean up genplot handling of stacks * * Revision 1.35  1996/06/05  19:38:32  jimz * fixed up disk queueing types config * added sstf disk queueing * fixed exit bug on diskthreads (ref-ing bad mem) * * Revision 1.34  1996/06/03  23:28:26  jimz * more bugfixes * check in tree to sync for IPDS runs with current bugfixes * there still may be a problem with threads in the script test * getting I/Os stuck- not trivially reproducible (runs ~50 times * in a row without getting stuck) * * Revision 1.33  1996/06/02  17:31:48  jimz * Moved a lot of global stuff into array structure, where it belongs. * Fixed up paritylogging, pss modules in this manner. Some general * code cleanup. Removed lots of dead code, some dead files. * * Revision 1.32  1996/05/30  23:22:16  jimz * bugfixes of serialization, timing problems * more cleanup * * Revision 1.31  1996/05/30  11:29:41  jimz * Numerous bug fixes. Stripe lock release code disagreed with the taking code * about when stripes should be locked (I made it consistent: no parity, no lock) * There was a lot of extra serialization of I/Os which I've removed- a lot of * it was to calculate values for the cache code, which is no longer with us. * More types, function, macro cleanup. Added code to properly quiesce the array * on shutdown. Made a lot of stuff array-specific which was (bogusly) general * before. Fixed memory allocation, freeing bugs. * * Revision 1.30  1996/05/27  18:56:37  jimz * more code cleanup * better typing * compiles in all 3 environments * * Revision 1.29  1996/05/24  01:59:45  jimz * another checkpoint in code cleanup for release * time to sync kernel tree * * Revision 1.28  1996/05/18  19:51:34  jimz * major code cleanup- fix syntax, make some types consistent, * add prototypes, clean out dead code, et cetera * * Revision 1.27  1995/12/12  18:10:06  jimz * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT * fix 80-column brain damage in comments * * Revision 1.26  1995/12/01  15:16:36  root * added copyright info * */#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include "rf_raid.h"#include "rf_raidframe.h"#include "rf_debugMem.h"#include "rf_utils.h"#include "rf_general.h"#include "rf_decluster.h"#include "rf_configure.h"#include "rf_sys.h"static unsigned int dev_name2num(char *s);static unsigned int osf_dev_name2num(char *s);static int rf_search_file_for_start_of(char *string, char *buf, int len,	FILE *fp);static int rf_get_next_nonblank_line(char *buf, int len, FILE *fp,	char *errmsg);/* called from user level to read the configuration file and create * a configuration control structure.  This is used in the user-level * version of the driver, and in the user-level program that configures * the system via ioctl. */int rf_MakeConfig(configname, cfgPtr)  char         *configname;  RF_Config_t  *cfgPtr;{  int numscanned, val, r, c, retcode, aa, bb, cc;  char buf[256], buf1[256], *cp;  RF_LayoutSW_t *lp;  FILE *fp;  bzero((char *)cfgPtr, sizeof(RF_Config_t));  fp = fopen(configname, "r");  if (!fp) {    RF_ERRORMSG1("Can't open config file %s\n",configname);    return(-1);  }    rewind(fp);  if (rf_search_file_for_start_of("array", buf, 256, fp)) {    RF_ERRORMSG1("Unable to find start of \"array\" params in config file %s\n",configname);    retcode = -1; goto out;  }  rf_get_next_nonblank_line(buf, 256, fp, "Config file error (\"array\" section):  unable to get numRow and numCol\n");  /*   * wackiness with aa, bb, cc to get around size problems on different platforms   */  numscanned = sscanf(buf,"%d %d %d", &aa, &bb, &cc);  if (numscanned != 3) {    RF_ERRORMSG("Config file error (\"array\" section):  unable to get numRow, numCol, numSpare\n");    retcode = -1; goto out;  }  cfgPtr->numRow = (RF_RowCol_t)aa;  cfgPtr->numCol = (RF_RowCol_t)bb;  cfgPtr->numSpare = (RF_RowCol_t)cc;  /* debug section is optional */  for (c=0; c<RF_MAXDBGV; c++)    cfgPtr->debugVars[c][0] = '\0';  rewind(fp);  if (!rf_search_file_for_start_of("debug", buf, 256, fp)) {    for (c=0; c < RF_MAXDBGV; c++) {      if (rf_get_next_nonblank_line(buf, 256, fp, NULL)) break;      cp = rf_find_non_white(buf);      if (!strncmp(cp, "START", strlen("START"))) break;      (void) strcpy(&cfgPtr->debugVars[c][0], cp);    }  }    rewind(fp);  strcpy(cfgPtr->diskQueueType,"fifo");  cfgPtr->maxOutstandingDiskReqs = 1;  /* scan the file for the block related to disk queues */  if (rf_search_file_for_start_of("queue",buf,256,fp)) {    RF_ERRORMSG2("[No disk queue discipline specified in config file %s.  Using %s.]\n",configname, cfgPtr->diskQueueType);  } else {    if (rf_get_next_nonblank_line(buf, 256, fp, NULL)) {      RF_ERRORMSG2("[No disk queue discipline specified in config file %s.  Using %s.]\n",configname, cfgPtr->diskQueueType);    }  }  /* the queue specifier line contains two entries:   * 1st char of first word specifies queue to be used   * 2nd word specifies max num reqs that can be outstanding on the disk itself (typically 1)   */  if (sscanf(buf,"%s %d",buf1,&val)!=2) {    RF_ERRORMSG1("Can't determine queue type and/or max outstanding reqs from line: ",buf);    RF_ERRORMSG2("Using %s-%d\n", cfgPtr->diskQueueType, cfgPtr->maxOutstandingDiskReqs);  } else {    char *c;    bcopy(buf1, cfgPtr->diskQueueType, RF_MIN(sizeof(cfgPtr->diskQueueType), strlen(buf1)+1));    for(c=buf1;*c;c++) {      if (*c == ' ') {        *c = '\0';        break;      }    }    cfgPtr->maxOutstandingDiskReqs = val;  }  rewind(fp);  if (rf_search_file_for_start_of("disks",buf,256,fp)) {    RF_ERRORMSG1("Can't find \"disks\" section in config file %s\n",configname);    retcode = -1; goto out;  }  for (r=0; r<cfgPtr->numRow; r++) {    for (c=0; c<cfgPtr->numCol; c++) {      if (rf_get_next_nonblank_line(&cfgPtr->devnames[r][c][0], 50, fp, NULL)) {	RF_ERRORMSG2("Config file error: unable to get device file for disk at row %d col %d\n",r,c);	retcode = -1; goto out;      }#ifndef SIMULATE      val = dev_name2num(&cfgPtr->devnames[r][c][0]);      if (val < 0) {	RF_ERRORMSG3("Config file error: can't get dev num (dev file '%s') for disk at row %d c %d\n",		  &cfgPtr->devnames[r][c][0],r,c);	retcode = -1; goto out;      } else cfgPtr->devs[r][c] = val;#endif /* !SIMULATE */    }  }  /* "spare" section is optional */  rewind(fp);  if (rf_search_file_for_start_of("spare",buf,256,fp)) cfgPtr->numSpare =0;  for (c = 0; c < cfgPtr->numSpare; c++) {    if (rf_get_next_nonblank_line(&cfgPtr->spare_names[c][0], 256, fp, NULL)) {      RF_ERRORMSG1("Config file error: unable to get device file for spare disk %d\n",c);      retcode = -1; goto out;    }#ifndef SIMULATE    val = dev_name2num(&cfgPtr->spare_names[c][0]);    if (val < 0) {      RF_ERRORMSG2("Config file error: can't get dev num (dev file '%s') for spare disk %d\n",		&cfgPtr->spare_names[c][0],c);      retcode = -1; goto out;    } else cfgPtr->spare_devs[c] = val;#endif /* !SIMULATE */  }  /* scan the file for the block related to layout */  rewind(fp);  if (rf_search_file_for_start_of("layout",buf,256,fp)) {    RF_ERRORMSG1("Can't find \"layout\" section in configuration file %s\n",configname);    retcode = -1; goto out;  }  if (rf_get_next_nonblank_line(buf, 256, fp, NULL)) {    RF_ERRORMSG("Config file error (\"layout\" section): unable to find common layout param line\n");    retcode = -1; goto out;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区久久久| 亚洲人成伊人成综合网小说| 久久99精品国产| 日韩精品一区二区三区蜜臀| 免费在线看成人av| 久久人人爽爽爽人久久久| 成人网在线播放| 亚洲黄色av一区| 欧美日本一区二区三区| 久久超碰97中文字幕| 久久新电视剧免费观看| 成人国产精品视频| 一区二区三区成人在线视频| 3d动漫精品啪啪| 国产成人精品免费看| 一区二区欧美视频| 日韩免费成人网| 不卡欧美aaaaa| 午夜精品免费在线| www国产精品av| 91小视频在线观看| 秋霞影院一区二区| 国产精品区一区二区三区| 欧美伊人精品成人久久综合97 | 欧洲一区在线电影| 五月婷婷综合在线| 国产欧美一区二区在线观看| 色偷偷久久人人79超碰人人澡| 丝袜亚洲另类欧美综合| 中文久久乱码一区二区| 欧美久久婷婷综合色| 成人激情校园春色| 蜜桃久久精品一区二区| 亚洲精选视频免费看| 欧美mv日韩mv国产网站app| 色噜噜狠狠成人网p站| 国产麻豆日韩欧美久久| 亚洲一区二区免费视频| 国产精品免费视频一区| 日韩你懂的在线播放| 在线视频国内自拍亚洲视频| 国产成人精品午夜视频免费| 日韩精彩视频在线观看| 亚洲卡通动漫在线| 久久精品网站免费观看| 日韩欧美成人午夜| 欧美视频一区二区在线观看| 99九九99九九九视频精品| 麻豆91精品视频| 亚洲不卡一区二区三区| 亚洲日本护士毛茸茸| 国产人成亚洲第一网站在线播放| 欧美一二三在线| 欧美美女bb生活片| 欧美性色黄大片| 91亚洲男人天堂| 成人黄色免费短视频| 国产一级精品在线| 久久99国产精品尤物| 日韩—二三区免费观看av| 亚洲成人免费观看| 亚洲一区二区三区四区在线免费观看 | 久热成人在线视频| 婷婷开心激情综合| 婷婷夜色潮精品综合在线| 亚洲国产精品尤物yw在线观看| 亚洲特级片在线| 国产精品麻豆久久久| 久久免费国产精品| 精品国产乱码久久久久久浪潮| 91精品国产aⅴ一区二区| 欧美日韩在线免费视频| 欧美三级欧美一级| 欧美日韩极品在线观看一区| 欧美日韩一区高清| 欧美日韩激情一区二区三区| 欧美视频在线不卡| 欧美日韩免费高清一区色橹橹| 在线亚洲人成电影网站色www| 91小视频免费观看| 欧洲一区二区三区免费视频| 欧美亚洲国产一区在线观看网站| 91免费精品国自产拍在线不卡 | 成人精品鲁一区一区二区| 国产激情视频一区二区三区欧美| 国产一区二区三区视频在线播放| 久久成人免费电影| 国产丶欧美丶日本不卡视频| 成人国产精品视频| 在线看日韩精品电影| 欧美日韩激情在线| 精品国产乱子伦一区| 久久久久成人黄色影片| 亚洲天堂av老司机| 日韩精品一二三四| 国产一区二区调教| 91免费精品国自产拍在线不卡| 欧美无砖专区一中文字| 91精品国产aⅴ一区二区| 久久蜜臀中文字幕| 中文字幕亚洲成人| 日韩精品91亚洲二区在线观看 | 国产精品国产三级国产aⅴ入口 | 欧美久久婷婷综合色| 精品美女一区二区三区| 国产精品电影院| 午夜精品一区二区三区电影天堂| 久久成人av少妇免费| av资源网一区| 3d动漫精品啪啪1区2区免费| 久久精品日产第一区二区三区高清版| 国产精品久久免费看| 亚洲成年人影院| 国产精品69久久久久水密桃| 91精彩视频在线观看| 久久综合给合久久狠狠狠97色69| 亚洲欧洲成人av每日更新| 日本成人在线电影网| 成人黄色电影在线| 日韩三级视频在线观看| 亚洲欧洲99久久| 激情综合色播五月| 欧美无人高清视频在线观看| 国产日韩欧美精品在线| 五月天婷婷综合| 99re在线精品| 久久综合九色综合欧美98| 亚洲电影一级黄| 成人福利视频在线| 精品国产乱码久久久久久闺蜜| 洋洋av久久久久久久一区| 精品亚洲aⅴ乱码一区二区三区| 色狠狠综合天天综合综合| 欧美精品一区二| 五月激情六月综合| 99久久精品国产导航| 精品少妇一区二区| 天天操天天干天天综合网| 91香蕉视频在线| 国产午夜精品久久久久久久 | 一区二区三区中文字幕电影| 国产在线观看一区二区| 91精品国产一区二区人妖| 日韩伦理av电影| 福利一区二区在线| 精品国产伦一区二区三区观看方式 | 欧美精品久久久久久久多人混战| 亚洲欧美一区二区三区极速播放| 国产美女久久久久| 日韩丝袜美女视频| 日韩电影免费在线观看网站| 欧美在线不卡视频| 亚洲小少妇裸体bbw| 色婷婷久久99综合精品jk白丝| 国产女人aaa级久久久级| 经典三级一区二区| 精品国产乱码久久久久久久久 | 午夜伦理一区二区| 欧洲色大大久久| 一区二区三区免费观看| 色哟哟一区二区在线观看| 中文字幕在线观看不卡视频| 不卡的av在线| 日韩美女视频一区| 色一情一乱一乱一91av| 亚洲人成网站色在线观看| 97久久超碰精品国产| 亚洲视频网在线直播| 日本韩国欧美一区二区三区| 一区二区三区欧美在线观看| 日本韩国精品在线| 亚洲影视在线观看| 精品视频1区2区3区| 日韩精品一二三| 日韩久久精品一区| 国产精品综合av一区二区国产馆| 久久久综合激的五月天| 成人一区在线观看| 亚洲三级电影全部在线观看高清| 色婷婷久久久综合中文字幕| 亚洲一区二区3| 日韩亚洲欧美一区| 国内精品嫩模私拍在线| 欧美国产在线观看| 色激情天天射综合网| 日本成人在线一区| 国产欧美精品一区aⅴ影院| 一本色道久久综合亚洲91| 三级久久三级久久| 久久精品亚洲精品国产欧美| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲精品成人在线| 欧美一区二区三区爱爱| 高清久久久久久| 一区二区三区在线视频播放| 欧美精品久久一区二区三区| 国产精品一区二区在线观看网站 | 亚洲国产成人av好男人在线观看| 日韩一区二区三免费高清| 国产成人在线影院|