TempleOSCD_150216.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:15 +02:00
1 parent 64f679eeb9
commit 401601816c
531 files changed
+23341 -22071

No files matched your search

+16 -19
View File
@@ -17,19 +17,18 @@ U8 *kernel_cfg_options="MemInit\0HeapInit\0VarInit\0"
class CKernelCfg
{
U8 *acct_name;
U8 *dsk_cache_size_exp;
CDoc *add_dev;
U8 *boot_rescue_drv_file,*boot_rescue_drv_start;
Bool opts[CFG_NUM_OPTIONS];
U8 mem_init_val,heap_init_val,var_init_val,
sys_acct_drv,auto_mount_ide_hd_let,auto_mount_ide_cd_let;
boot_drv_let,auto_mount_ide_hd_let,auto_mount_ide_cd_let;
Bool cdrom_ports_pmt;
};
CDoc *KernelCfgAddDev(CKernelCfg *c)
{
I64 ch,num_hints,first_prt_num,type,unit,cnt=0;
I64 ch,num_hints,first_drv_num,type,unit,cnt=0;
U8 blks_buf[256],addr_buf[256],base0_buf[128],base1_buf[128];
CATARep *root=NULL,*tempha;
CDoc *doc=DocNew;
@@ -38,12 +37,12 @@ CDoc *KernelCfgAddDev(CKernelCfg *c)
"\n\nIn anticipation of the drives you will\n"
"define shortly, enter the drive letter\n"
"of the drive with the account directory.\n"
"\n($$PURPLE$$<ENTER>$$FG$$ for cur drv) Acct Drv:";
"\n($$PURPLE$$<ENTER>$$FG$$ for cur drv) Home Drv:";
ch=ToUpper(GetChar);
if ('A'<=ch<='Z')
c->sys_acct_drv=ch;
c->boot_drv_let=ch;
else
c->sys_acct_drv=Fs->cur_prt->drv_let;
c->boot_drv_let=Drv2Let(Fs->cur_dv);
"\n\n$$BK,1$$$$PURPLE$$Mount drives so they will be present when "
"you boot.$$FG$$$$BK,0$$\n";
@@ -55,9 +54,9 @@ CDoc *KernelCfgAddDev(CKernelCfg *c)
"If more than one partition is present\n"
"they will be lettered in sequence.\n"
"\nFirst Drive Letter ($$PURPLE$$<ENTER>$$FG$$ to exit):";
first_prt_num=ToUpper(GetChar)-'A';
first_drv_num=ToUpper(GetChar)-'A';
'\n';
if (0<=first_prt_num<NUM_PRTS) {
if (0<=first_drv_num<NUM_DRVS) {
"\t$$PURPLE$$1$$FG$$=RAM\n\t$$PURPLE$$2$$FG$$=ATA(Harddisk)\n"
"\t$$PURPLE$$3$$FG$$=ATAPI(CD-ROM)\nType:";
type=GetChar-'0';
@@ -111,30 +110,30 @@ CDoc *KernelCfgAddDev(CKernelCfg *c)
LinkedLstDel(root);
}
if (BDT_NULL<type<BDT_NUM_TYPES && 0<=unit<=1) {
DocPrint(doc,"bdev=BlkDevNextFree(%d,%d);"
"bdev->unit=%d;",first_prt_num+'A',type,unit);
DocPrint(doc,"bd=BlkDevNextFree(%d,%d);"
"bd->unit=%d;",first_drv_num+'A',type,unit);
if (type==BDT_RAM) {
if (!*addr_buf) StrCpy(addr_buf,"0");
DocPrint(doc,"bdev->RAM_dsk=%s;",addr_buf);
DocPrint(doc,"bdev->max_blk=(%s)-1;",blks_buf);
DocPrint(doc,"bd->RAM_dsk=%s;",addr_buf);
DocPrint(doc,"bd->max_blk=(%s)-1;",blks_buf);
}
make_free=FALSE;
if (type==BDT_ATA || type==BDT_ATAPI) {
if (type==BDT_ATAPI && !*base0_buf) {
c->cdrom_ports_pmt=TRUE;
DocPrint(doc,"dsk.boot_rescue_drv_pmt=GetBaseUnit(bdev);");
if (first_prt_num+'A'==c->sys_acct_drv)
DocPrint(doc,"dsk.boot_rescue_drv_pmt=GetBaseUnit(bd);");
if (first_drv_num+'A'==c->boot_drv_let)
make_free=TRUE;
} else
DocPrint(doc,"bdev->base0=%s;bdev->base1=%s;",
DocPrint(doc,"bd->base0=%s;bd->base1=%s;",
base0_buf,base1_buf);
}
DocPrint(doc,"BlkDevAdd(bdev,FALSE,%d);",make_free);
DocPrint(doc,"BlkDevAdd(bd,FALSE,%d);",make_free);
cnt++;
} else
"\n\n$$BK,1$$$$RED$$Operation Failed$$BK,0$$$$FG$$\n\n";
}
} while (!cnt || 0<=first_prt_num<NUM_PRTS);
} while (!cnt || 0<=first_drv_num<NUM_DRVS);
return doc;
}
@@ -223,7 +222,6 @@ CKernelCfg *KernelCfgNew()
CKernelCfg *c=CAlloc(sizeof(CKernelCfg));
c->add_dev=KernelCfgAddDev(c);
c->acct_name=GetStr("Start-up Acct ($$PURPLE$$<ENTER>$$FG$$ will prompt):");
c->dsk_cache_size_exp=GetStr(
"Disk Cache Size in Bytes,\n"
"gets rounded-up funny,\n"
@@ -237,7 +235,6 @@ U0 KernelCfgDel(CKernelCfg *c)
{
DocDel(c->add_dev);
Free(c->boot_rescue_drv_file);
Free(c->acct_name);
Free(c->dsk_cache_size_exp);
Free(c);
}