Hi! ______________O\_/_________________________________\_/O______________ struct config Config = { 0, NUMBUFF, NFILES, 0, NFCBS, 0, "command.com", " /P /E:256\r\n", [...] STATIC struct table commands[] = { {"COMMAND", 1, InitPgm}, {"SHELL", 1, InitPgm}, [...] STATIC VOID InitPgm(BYTE * pLine) { static char init[NAMEMAX]; static char inittail[NAMEMAX];
Config.cfgInit = init; Config.cfgInitTail = inittail; _____________________________________________________________________ O/~\ /~\O - InitPgm() used both for (undocumented) command "COMMAND" and for "SHELL". This is valid only if "COMMAND" is duplication for "SHELL", but then this statement is useless. - init[] and inittail[] used without BSS_INIT(). Bug? I may suggest next patch: ______________O\_/_________________________________\_/O______________ diff -ruNp old/config.c new/config.c --- old/config.c 2004-04-14 16:04:04.000000000 +0000 +++ new/config.c 2004-04-22 11:01:06.000000000 +0000 @@ -125,6 +125,9 @@ static UBYTE ErrorAlreadyPrinted[128] BS char master_env[128] BSS_INIT({0}); static char *envp = master_env; +static char init[NAMEMAX] = "command.com"; +static char inittail[NAMEMAX] = " /P /E:256\r\n"; + struct config Config = { 0, NUMBUFF, @@ -132,8 +135,8 @@ struct config Config = { 0, NFCBS, 0, - "command.com", - " /P /E:256\r\n", + init, + inittail, NLAST, 0, NSTACKS, @@ -1237,12 +1240,6 @@ STATIC VOID InitPgmHigh(BYTE * pLine) STATIC VOID InitPgm(BYTE * pLine) { - static char init[NAMEMAX]; - static char inittail[NAMEMAX]; - - Config.cfgInit = init; - Config.cfgInitTail = inittail; - /* Get the string argument that represents the new init pgm */ pLine = GetStringArg(pLine, Config.cfgInit); _____________________________________________________________________ O/~\ /~\O But I don't understand why from 2033 cfgInit and cfgInitTail was converted from arrays to pointers. I see only only one reason: cfgInit used as pointer to Cmd.ctBuffer in main.c:kernel(). But who prevents to declare cfgInit as array of [NAMEMAX*2] and remove completely Cmd and .cfgInitTail? PS: Bart, if you wish, I may remove cfgInitTail for you. PPS: Bart, you don't answer, why you not move VDISK_BOOT_SECTOR from inithma.c:InstallVDISK() into kernel.asm and not remove InstallVDISK()? ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel