summaryrefslogtreecommitdiffstats
path: root/src/interface
diff options
context:
space:
mode:
authorMichael Brown2006-08-09 02:25:29 +0200
committerMichael Brown2006-08-09 02:25:29 +0200
commit71754ada2a363c6ad33e303948061c27c3e94750 (patch)
treed3f6c01fab7a3b4969e5447d14f5924d4f629c71 /src/interface
parentAllow linking by converting all functions to stubs (diff)
downloadipxe-71754ada2a363c6ad33e303948061c27c3e94750.tar.gz
ipxe-71754ada2a363c6ad33e303948061c27c3e94750.tar.xz
ipxe-71754ada2a363c6ad33e303948061c27c3e94750.zip
Allow linking by converting functions to stubs
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/pxe/pxe_preboot.c22
-rw-r--r--src/interface/pxe/pxe_tftp.c31
2 files changed, 25 insertions, 28 deletions
diff --git a/src/interface/pxe/pxe_preboot.c b/src/interface/pxe/pxe_preboot.c
index fbe89296..0de24f7f 100644
--- a/src/interface/pxe/pxe_preboot.c
+++ b/src/interface/pxe/pxe_preboot.c
@@ -23,8 +23,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#if 0
-
#include "pxe.h"
#include "pxe_callbacks.h"
@@ -39,8 +37,8 @@ PXENV_EXIT_t pxenv_unload_stack ( struct s_PXENV_UNLOAD_STACK *unload_stack ) {
int success;
DBG ( "PXENV_UNLOAD_STACK" );
- success = ensure_pxe_state ( CAN_UNLOAD );
+#if 0
/* We need to call cleanup() at some point. The network card
* has already been disabled by ENSURE_CAN_UNLOAD(), but for
* the sake of completeness we should call the console_fini()
@@ -58,6 +56,7 @@ PXENV_EXIT_t pxenv_unload_stack ( struct s_PXENV_UNLOAD_STACK *unload_stack ) {
unload_stack->Status = PXENV_STATUS_KEEP_ALL;
return PXENV_EXIT_FAILURE;
}
+#endif
unload_stack->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
@@ -69,10 +68,9 @@ PXENV_EXIT_t pxenv_unload_stack ( struct s_PXENV_UNLOAD_STACK *unload_stack ) {
*/
PXENV_EXIT_t pxenv_get_cached_info ( struct s_PXENV_GET_CACHED_INFO
*get_cached_info ) {
- BOOTPLAYER_t *cached_info = &pxe_stack->cached_info;
DBG ( "PXENV_GET_CACHED_INFO %d", get_cached_info->PacketType );
- ENSURE_READY ( get_cached_info );
+#if 0
/* Fill in cached_info structure in our pxe_stack */
/* I don't think there's actually any way we can be called in
@@ -128,6 +126,7 @@ PXENV_EXIT_t pxenv_get_cached_info ( struct s_PXENV_GET_CACHED_INFO
* have a way to detect this already.
*/
}
+#endif
get_cached_info->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
@@ -142,8 +141,8 @@ PXENV_EXIT_t pxenv_restart_tftp ( struct s_PXENV_TFTP_READ_FILE
PXENV_EXIT_t tftp_exit;
DBG ( "PXENV_RESTART_TFTP" );
- ENSURE_READY ( restart_tftp );
+#if 0
/* Words cannot describe the complete mismatch between the PXE
* specification and any possible version of reality...
*/
@@ -156,6 +155,7 @@ PXENV_EXIT_t pxenv_restart_tftp ( struct s_PXENV_TFTP_READ_FILE
/* Fire up the new NBP */
restart_tftp->Status = xstartpxe();
+#endif
/* Not sure what "SUCCESS" actually means, since we can only
* return if the new NBP failed to boot...
@@ -171,8 +171,8 @@ PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi ) {
unsigned char bus, devfn;
DBG ( "PXENV_START_UNDI" );
- ENSURE_MIDWAY(start_undi);
+#if 0
/* Record PCI bus & devfn passed by caller, so we know which
* NIC they want to use.
*
@@ -203,6 +203,8 @@ PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi ) {
}
#endif
+#endif
+
start_undi->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
}
@@ -214,10 +216,12 @@ PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi ) {
PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi ) {
DBG ( "PXENV_STOP_UNDI" );
+#if 0
if ( ! ensure_pxe_state(CAN_UNLOAD) ) {
stop_undi->Status = PXENV_STATUS_KEEP_UNDI;
return PXENV_EXIT_FAILURE;
}
+#endif
stop_undi->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
@@ -229,7 +233,7 @@ PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi ) {
*/
PXENV_EXIT_t pxenv_start_base ( struct s_PXENV_START_BASE *start_base ) {
DBG ( "PXENV_START_BASE" );
- /* ENSURE_READY ( start_base ); */
+
start_base->Status = PXENV_STATUS_UNSUPPORTED;
return PXENV_EXIT_FAILURE;
}
@@ -249,5 +253,3 @@ PXENV_EXIT_t pxenv_stop_base ( struct s_PXENV_STOP_BASE *stop_base ) {
stop_base->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
}
-
-#endif
diff --git a/src/interface/pxe/pxe_tftp.c b/src/interface/pxe/pxe_tftp.c
index fffebf21..a834be09 100644
--- a/src/interface/pxe/pxe_tftp.c
+++ b/src/interface/pxe/pxe_tftp.c
@@ -22,8 +22,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#if 0
-
#include "pxe.h"
static int pxe_tftp_read_block ( unsigned char *data, unsigned int block,
@@ -109,13 +107,9 @@ static int pxe_tftp_read_block ( unsigned char *data, unsigned int block,
* other PXE API call "if an MTFTP connection is active".
*/
PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open ) {
- struct sockaddr_in tftp_server;
- struct tftpreq_info_t request;
- struct tftpblk_info_t block;
-
DBG ( "PXENV_TFTP_OPEN" );
- ENSURE_READY ( tftp_open );
+#if 0
/* Set server address and port */
tftp_server.sin_addr.s_addr = tftp_open->ServerIPAddress
? tftp_open->ServerIPAddress
@@ -146,6 +140,7 @@ PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open ) {
pxe_stack->tftpdata.len = block.len;
pxe_stack->tftpdata.eof = block.eof;
memcpy ( pxe_stack->tftpdata.data, block.data, block.len );
+#endif
tftp_open->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
@@ -174,7 +169,7 @@ PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open ) {
*/
PXENV_EXIT_t pxenv_tftp_close ( struct s_PXENV_TFTP_CLOSE *tftp_close ) {
DBG ( "PXENV_TFTP_CLOSE" );
- ENSURE_READY ( tftp_close );
+
tftp_close->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
}
@@ -246,11 +241,9 @@ PXENV_EXIT_t pxenv_tftp_close ( struct s_PXENV_TFTP_CLOSE *tftp_close ) {
* @ref pxe_x86_pmode16 "implementation note" for more details.)
*/
PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
- struct tftpblk_info_t block;
-
DBG ( "PXENV_TFTP_READ" );
- ENSURE_READY ( tftp_read );
+#if 0
/* Do we have a block pending */
if ( pxe_stack->tftpdata.magic_cookie == PXE_TFTP_MAGIC_COOKIE ) {
block.data = pxe_stack->tftpdata.data;
@@ -271,6 +264,7 @@ PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
memcpy ( SEGOFF16_TO_PTR(tftp_read->Buffer), block.data, block.len );
DBG ( " %d to %hx:%hx", block.len, tftp_read->Buffer.segment,
tftp_read->Buffer.offset );
+#endif
tftp_read->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
@@ -369,14 +363,11 @@ PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
*/
PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
*tftp_read_file ) {
- struct sockaddr_in tftp_server;
- int rc;
-
DBG ( "PXENV_TFTP_READ_FILE %s to [%x,%x)", tftp_read_file->FileName,
tftp_read_file->Buffer,
tftp_read_file->Buffer + tftp_read_file->BufferSize );
- ENSURE_READY ( tftp_read_file );
+#if 0
/* inserted by Klaus Wittemeier */
/* KERNEL_BUF stores the name of the last required file */
/* This is a fix to make Microsoft Remote Install Services work (RIS) */
@@ -399,10 +390,13 @@ PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
tftp_read_file->Status = PXENV_STATUS_FAILURE;
return PXENV_EXIT_FAILURE;
}
+#endif
+
tftp_read_file->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
}
+#if 0
static int pxe_tftp_read_block ( unsigned char *data,
unsigned int block __unused,
unsigned int len, int eof ) {
@@ -415,6 +409,7 @@ static int pxe_tftp_read_block ( unsigned char *data,
pxe_stack->readfile.offset += len;
return eof ? 0 : 1;
}
+#endif
/**
* TFTP GET FILE SIZE
@@ -463,8 +458,8 @@ PXENV_EXIT_t pxenv_tftp_get_fsize ( struct s_PXENV_TFTP_GET_FSIZE
int rc;
DBG ( "PXENV_TFTP_GET_FSIZE" );
- ENSURE_READY ( tftp_get_fsize );
+#if 0
pxe_stack->readfile.buffer = NULL;
pxe_stack->readfile.bufferlen = 0;
pxe_stack->readfile.offset = 0;
@@ -476,6 +471,8 @@ PXENV_EXIT_t pxenv_tftp_get_fsize ( struct s_PXENV_TFTP_GET_FSIZE
return PXENV_EXIT_FAILURE;
}
tftp_get_fsize->FileSize = pxe_stack->readfile.offset;
+#endif
+
tftp_get_fsize->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
}
@@ -623,5 +620,3 @@ Note to future API designers at Intel: try to understand the
underlying network protocol first!
*/
-
-#endif