diff options
author | Marty Connor | 2010-01-17 03:47:39 +0100 |
---|---|---|
committer | Marty Connor | 2010-01-17 03:47:39 +0100 |
commit | 330abebddf67ab27998f64070f27d5874cbc7b06 (patch) | |
tree | 08f5954725930ee9c38b0afab4cb9a30c71ce7e3 /contrib/auto-default/main.c.patch | |
parent | [sanboot] Prevent leaking a stack reference for "keep-san" AoE (diff) | |
download | ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.tar.gz ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.tar.xz ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.zip |
[contrib] Move most contrib content to a separate repository
Most of the content that was previously in this directory has been
moved to a separate git repository:
http://git.etherboot.org/?p=contrib.git;a=summary
or the Etherboot Project wiki:
http://etherboot.org/
Diffstat (limited to 'contrib/auto-default/main.c.patch')
-rw-r--r-- | contrib/auto-default/main.c.patch | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/contrib/auto-default/main.c.patch b/contrib/auto-default/main.c.patch deleted file mode 100644 index e707b63a..00000000 --- a/contrib/auto-default/main.c.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- main.c Mon Nov 5 18:58:30 2001 -+++ main.c.new Thu Nov 15 01:45:12 2001 -@@ -149,21 +151,49 @@ - static unsigned short ipchksum(unsigned short *ip, int len); - static unsigned short udpchksum(struct iphdr *packet); - -+ -+#if defined(ASK_BOOT) && ASK_BOOT > 0 && (ANS_DEFAULT == ANS_AUTO) -+/* -+ * Read Installed Hard Disk Count from BIOS memory at 0:0475 -+ */ -+static int hdsk_cnt(void) -+{ -+ int retv; -+ __asm__ __volatile__( -+ "xorw %%ax,%%ax\n\t" -+ "movb 0x475,%%al\n" -+ : "=a" (retv) -+ : /* no inputs */ -+ : "ax", "cc", "memory" -+ ); -+ return(retv); -+} -+#endif /* ASK_BOOT && ANS_AUTO */ -+ -+ - static inline void ask_boot(void) - { - #if defined(ASK_BOOT) && ASK_BOOT > 0 - while(1) { -- int c; -+ int c, deflt; - unsigned long time; -+#if defined(ASK_BOOT) && ASK_BOOT > 0 && (ANS_DEFAULT == ANS_AUTO) -+ if (hdsk_cnt() != 0) -+ deflt = ANS_LOCAL; -+ else -+ deflt = ANS_NETWORK; -+#else -+ deflt = ANS_DEFAULT; -+#endif - printf(ASK_PROMPT); - for (time = currticks() + ASK_BOOT*TICKS_PER_SEC; !iskey(); ) - if (currticks() > time) { -- c = ANS_DEFAULT; -+ c = deflt; - goto done; - } - c = getchar(); - if ((c >= 'a') && (c <= 'z')) c &= 0x5F; -- if (c == '\n') c = ANS_DEFAULT; -+ if (c == '\n') c = deflt; - done: - if ((c >= ' ') && (c <= '~')) putchar(c); - putchar('\n'); |