1 --- main.c Mon Nov 5 18:58:30 2001
2 +++ main.c.new Thu Nov 15 01:45:12 2001
4 static unsigned short ipchksum(unsigned short *ip, int len);
5 static unsigned short udpchksum(struct iphdr *packet);
8 +#if defined(ASK_BOOT) && ASK_BOOT > 0 && (ANS_DEFAULT == ANS_AUTO)
10 + * Read Installed Hard Disk Count from BIOS memory at 0:0475
12 +static int hdsk_cnt(void)
15 + __asm__ __volatile__(
16 + "xorw %%ax,%%ax\n\t"
20 + : "ax", "cc", "memory"
24 +#endif /* ASK_BOOT && ANS_AUTO */
27 static inline void ask_boot(void)
29 #if defined(ASK_BOOT) && ASK_BOOT > 0
34 +#if defined(ASK_BOOT) && ASK_BOOT > 0 && (ANS_DEFAULT == ANS_AUTO)
35 + if (hdsk_cnt() != 0)
38 + deflt = ANS_NETWORK;
40 + deflt = ANS_DEFAULT;
43 for (time = currticks() + ASK_BOOT*TICKS_PER_SEC; !iskey(); )
44 if (currticks() > time) {
50 if ((c >= 'a') && (c <= 'z')) c &= 0x5F;
51 - if (c == '\n') c = ANS_DEFAULT;
52 + if (c == '\n') c = deflt;
54 if ((c >= ' ') && (c <= '~')) putchar(c);