📄 opfile.c
字号:
} else if (strcmp(param[index], "rawtest_size") == 0) { ++index; if (strcmp(param[index], "100") == 0) temp = 0; else if (strcmp(param[index], "200") == 0) temp = 1; else if (strcmp(param[index], "400") == 0) temp = 2; else if (strcmp(param[index], "600") == 0) temp = 3; else if (strcmp(param[index], "800") == 0) temp = 4; else if (strcmp(param[index], "1000") == 0) temp = 5; else if (strcmp(param[index], "1200") == 0) temp = 6; (int)tests[test_id]->data &= ~0x70; (int)tests[test_id]->data |= temp << 4; } ++index; } break; case MAGTAPE1: case MAGTAPE2: case SCSITAPE: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "format") == 0) { ++index; (int)tests[test_id]->data &= ~3; if (strcmp(param[index], "QIC-24") == 0) (int)tests[test_id]->data |= 1; else if (strcmp(param[index], "QIC-11&QIC-24") == 0) (int)tests[test_id]->data |= 2; } else if (strcmp(param[index], "density") == 0) { ++index; (int)tests[test_id]->data &= ~7; if (strcmp(param[index], "1600-BPI") == 0) (int)tests[test_id]->data |= 1; else if (strcmp(param[index], "6250-BPI") == 0) (int)tests[test_id]->data |= 2;#ifdef NEW else if (strcmp(param[index], "EXB-8500") == 0) { if (tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISEXB8500) (int)tests[test_id]->data |= 1; }#endif NEW else if (strcmp(param[index], "compression") == 0) { if ((tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISHP || tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISKENNEDY) && tests[test_id]->conf->uval.tapeinfo.status == FLT_COMP) (int)tests[test_id]->data |= 4;#ifdef NEW else if ((tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISEXB8500) && tests[test_id]->conf->uval.tapeinfo.status == FLT_COMP) (int)tests[test_id]->data |= 3;#endif NEW } else if (strcmp(param[index], "all") == 0) { if (tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISHP || tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISKENNEDY) (int)tests[test_id]->data |= 3;#ifdef NEW else if (tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISEXB8500) (int)tests[test_id]->data |= 2;#endif NEW }#ifdef NEW else if (strcmp(param[index], "both") == 0) { if ((tests[test_id]->conf->uval.tapeinfo.t_type == MT_ISEXB8500) && tests[test_id]->conf->uval.tapeinfo.status != FLT_COMP) (int)tests[test_id]->data |= 2; }#endif NEW } else if (strcmp(param[index], "length") == 0) { ++index; (int)tests[test_id]->data &= ~0x18; if (strcmp(param[index], "specified") == 0) (int)tests[test_id]->data |= 1 << 3; else if (strcmp(param[index], "long") == 0) (int)tests[test_id]->data |= 2 << 3; else if (strcmp(param[index], "short") == 0) (int)tests[test_id]->data |= 3 << 3; } else if (strcmp(param[index], "mode") == 0) { ++index; if (strcmp(param[index], "readonly") == 0) (int)tests[test_id]->data |= 0x100; else if (strcmp(param[index], "write_read") == 0) (int)tests[test_id]->data &= ~0x100; } else if (strcmp(param[index], "file_test") == 0) { ++index; if (strcmp(param[index], disable) == 0) (int)tests[test_id]->data |= 0x20; else if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data &= ~0x20; } else if (strcmp(param[index], "streaming") == 0) { ++index; if (strcmp(param[index], enable) == 0) (int)tests[test_id]->data |= 0x40; else if (strcmp(param[index], disable) == 0) (int)tests[test_id]->data &= ~0x40; } else if (strcmp(param[index], "recon") == 0) { ++index; if (strcmp(param[index], enable) == 0) (int)tests[test_id]->data |= 0x80; else if (strcmp(param[index], disable) == 0) (int)tests[test_id]->data &= ~0x80; } else if (strcmp(param[index], "retension") == 0) { ++index; if (strcmp(param[index], disable) == 0) (int)tests[test_id]->data |= 0x200; else if (strcmp(param[index], enable) == 0) (int)tests[test_id]->data &= ~0x200; } else if (strcmp(param[index], "clean_head") == 0) { ++index; if (strcmp(param[index], disable) == 0) (int)tests[test_id]->data |= 0x400; else if (strcmp(param[index], enable) == 0) (int)tests[test_id]->data &= ~0x400; } else if (strcmp(param[index], "block") == 0) { ++index; (unsigned)tests[test_id]->special= (unsigned)atoi(param[index]); } else if (strcmp(param[index], "pass") == 0) { ++index; (unsigned)tests[test_id]->data = ((unsigned)tests[test_id]->data&0xffff) | (unsigned)atoi(param[index])<<16; } ++index; } break; case TV1: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "ntsc") == 0) { ++index; if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data |= 1; else if (strcmp(param[index] , disable) == 0) (int)tests[test_id]->data &= ~1; } else if (strcmp(param[index], "yc") == 0) { ++index; if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data |= 2; else if (strcmp(param[index] , disable) == 0) (int)tests[test_id]->data &= ~2; } else if (strcmp(param[index], "yuv") == 0) { ++index; if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data |= 4; else if (strcmp(param[index] , disable) == 0) (int)tests[test_id]->data &= ~4; } else if (strcmp(param[index], "rgb") == 0) { ++index; if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data |= 8; else if (strcmp(param[index] , disable) == 0) (int)tests[test_id]->data &= ~8; } ++index; } break; case IPC: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "floppy") == 0) { ++index; if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data |= 1; else if (strcmp(param[index] , disable) == 0) (int)tests[test_id]->data &= ~1; } else if (strcmp(param[index], "printer") == 0) { ++index; if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data |= 2; else if (strcmp(param[index] , disable) == 0) (int)tests[test_id]->data &= ~2; } ++index; } break; case MCP: case MTI: case SCP: case SCP2: case SCSISP1: case SCSISP2: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "from") == 0) { ++index; temp = strlen(param[index]); *(param[index]+temp-1) = '\0'; /* get rid of '$' */ (void)strcpy(((struct loopback *)(tests[test_id]->data))->from, param[index]); } else if (strcmp(param[index], "to") == 0) { ++index; temp = strlen(param[index]); *(param[index]+temp-1) = '\0'; /* get rid of '$' */ (void)strcpy(((struct loopback *)(tests[test_id]->data))->to, param[index]); } ++index; } break; case HSI: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "clock_source") == 0) { ++index; if (strcmp(param[index], "external") == 0) temp = 1; else temp = 0; (int)tests[test_id]->data &= ~16; (int)tests[test_id]->data |= temp << 4; } else if (strcmp(param[index], "port_type") == 0) { ++index; if (strcmp(param[index], "V.35") == 0) temp = 1; else if (strcmp(param[index], "RS449&V.35") == 0) temp = 2; else if (strcmp(param[index], "RS449-V.35") == 0) temp = 3; else temp = 0; (int)tests[test_id]->data &= ~12; (int)tests[test_id]->data |= temp << 2; } else if (strcmp(param[index], "loopback") == 0) { ++index; if (strcmp(param[index], "1") == 0 || strcmp(param[index], "3") == 0) temp = 1; else if (strcmp(param[index], "01") == 0 || strcmp(param[index], "23") == 0) temp = 2; else if (strcmp(param[index], "0-1") == 0 || strcmp(param[index], "2-3") == 0) temp = 3; else temp = 0; if ((((int)tests[test_id]->data & 12) >> 2) == 3) temp = 3; /* force 0-1/2-3 loopback */ (int)tests[test_id]->data &= ~3; (int)tests[test_id]->data |= temp; } ++index; } break; case SBUS_HSI: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "clock_source") == 0) { ++index; if (strcmp(param[index], "External") == 0) temp = 1; else temp = 0; (int)tests[test_id]->data &= ~1; (int)tests[test_id]->data |= temp; } else if (strcmp(param[index], "internal_loopback") == 0) { ++index; if (strcmp(param[index], "enable") == 0) temp = 1; else temp =0; (int)tests[test_id]->data &= ~2; (int)tests[test_id]->data |= temp << 1; } else if (strcmp(param[index], "loopback") == 0) { ++index; if (strcmp(param[index], "1") == 0 || strcmp(param[index], "5") == 0 || strcmp(param[index], "9") == 0) temp = 1; else if (strcmp(param[index], "2") == 0 || strcmp(param[index], "6") == 0 || strcmp(param[index], "10") == 0) temp = 2; else if (strcmp(param[index], "3") == 0 || strcmp(param[index], "7") == 0 || strcmp(param[index], "11") == 0) temp = 3; else if (strcmp(param[index], "0,1,2,3") == 0 || strcmp(param[index], "4,5,6,7") == 0 || strcmp(param[index], "8,9,10,11") == 0) temp = 4; else if (strcmp(param[index], "0-1,2-3") == 0 || strcmp(param[index], "4-5,6-7") == 0 || strcmp(param[index], "8-9,10-11") == 0) temp = 5; else if (strcmp(param[index], "0-2,1-3") == 0 || strcmp(param[index], "4-6,5-7") == 0 || strcmp(param[index], "8-10,9-11") == 0) temp = 6; else if (strcmp(param[index], "0-3,1-2") == 0 || strcmp(param[index], "4-7,5-6") == 0 || strcmp(param[index], "8-11,9-10") == 0) temp = 7; else temp = 0; /* use 0x0F0 instead of 0x070 to clear out all bits */ (int)tests[test_id]->data &= ~0x0F0; (int)tests[test_id]->data |= temp << 4; } ++index; } break; case GP: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "graphics_buffer") == 0) { ++index; if (strcmp(param[index] , enable) == 0) (int)tests[test_id]->data = 1; else if (strcmp(param[index] , disable) == 0) (int)tests[test_id]->data = 0; } ++index; } break; case PRESTO: while (param[index] != NULL) /* still more to be checked */ { if (param[index+1] == NULL) break; if (strcmp(param[index], "presto_perf_ratio") == 0) { ++index; if (strcmp(param[index] , enable) == 0) tests[test_id]->data = (caddr_t)1; else if (strcmp(param[index] , disable) == 0) tests[test_id]->data = (caddr_t)0; } ++index; } break; case CG12: while (param[index] != NULL) /* still more to be checked */ {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -