Hello, OKUJI!

>   I think it is much better than the old one, but I haven't tested it
> very much, so probably it contains some serious bugs. Be careful. If
> you find any bug, let me know.

"install" doesn't work in the GRUB shell. It hangs with high CPU load.
This may be suggestive:

792       while (*((unsigned long *) i))
(gdb) l
787         = new_drive;
788       *((unsigned short *) (BOOTSEC_LOCATION + STAGE1_INSTALLADDR))
789         = installaddr;
790       
791       i = BOOTSEC_LOCATION+STAGE1_FIRSTLIST - 4;
792       while (*((unsigned long *) i))
793         {
794           if (i < BOOTSEC_LOCATION + STAGE1_FIRSTLIST - 256
795               || (*((int *) (i - 4)) & 0x80000000)
796               || *((unsigned short *) i) >= 0xA00
(gdb) p/x i
$2 = 0x4014adb1

Just in case, I'm using RedHat-6.0, gcc-2.95.1

Also I don't like how you implement the "configfile"
Calling cmain() will waste some space on the stack.

Or maybe you mean that cmain() may return sometimes?
This could be used to implement return from nesting menus.

Pavel Roskin

Reply via email to