mirror of https://github.com/ipxe/ipxe.git
Rewrote printf and friends to better support standard C semantics.
parent
f99e7a375e
commit
2421723a15
|
@ -16,6 +16,7 @@ typedef signed long int32_t;
|
||||||
typedef signed long long int64_t;
|
typedef signed long long int64_t;
|
||||||
|
|
||||||
typedef unsigned long physaddr_t;
|
typedef unsigned long physaddr_t;
|
||||||
|
typedef unsigned long intptr_t;
|
||||||
|
|
||||||
typedef signed char s8;
|
typedef signed char s8;
|
||||||
typedef unsigned char u8;
|
typedef unsigned char u8;
|
||||||
|
|
|
@ -1,213 +1,322 @@
|
||||||
|
#include <stddef.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <gpxe/if_ether.h> /* for ETH_ALEN */
|
#include <console.h>
|
||||||
#include "limits.h" /* for CHAR_BIT */
|
#include <errno.h>
|
||||||
#include "console.h"
|
#include <vsprintf.h>
|
||||||
#include "errno.h"
|
|
||||||
#include "vsprintf.h"
|
|
||||||
|
|
||||||
#define LONGLONG_SHIFT ((int)((sizeof(unsigned long long)*CHAR_BIT) - 4))
|
#define CHAR_LEN 1
|
||||||
#define LONG_SHIFT ((int)((sizeof(unsigned long)*CHAR_BIT) - 4))
|
#define SHORT_LEN 2
|
||||||
#define INT_SHIFT ((int)((sizeof(unsigned int)*CHAR_BIT) - 4))
|
#define INT_LEN 3
|
||||||
#define SHRT_SHIFT ((int)((sizeof(unsigned short)*CHAR_BIT) - 4))
|
#define LONG_LEN 4
|
||||||
#define CHAR_SHIFT ((int)((sizeof(unsigned char)*CHAR_BIT) - 4))
|
#define LONGLONG_LEN 5
|
||||||
|
#define SIZE_T_LEN 6
|
||||||
|
|
||||||
|
static uint8_t type_sizes[] = {
|
||||||
|
[CHAR_LEN] = sizeof ( char ),
|
||||||
|
[SHORT_LEN] = sizeof ( short ),
|
||||||
|
[INT_LEN] = sizeof ( int ),
|
||||||
|
[LONG_LEN] = sizeof ( long ),
|
||||||
|
[LONGLONG_LEN] = sizeof ( long long ),
|
||||||
|
[SIZE_T_LEN] = sizeof ( size_t ),
|
||||||
|
};
|
||||||
|
|
||||||
/** @file */
|
/** @file */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a formatted string to a buffer.
|
* A printf context
|
||||||
*
|
*
|
||||||
* @v buf Buffer into which to write the string, or NULL
|
* Contexts are used in order to be able to share code between
|
||||||
|
* vprintf() and vsnprintf(), without requiring the allocation of a
|
||||||
|
* buffer for vprintf().
|
||||||
|
*/
|
||||||
|
struct printf_context {
|
||||||
|
/**
|
||||||
|
* Character handler
|
||||||
|
*
|
||||||
|
* @v ctx Context
|
||||||
|
* @v c Character
|
||||||
|
*
|
||||||
|
* This method is called for each character written to the
|
||||||
|
* formatted string. It must increment @len.
|
||||||
|
*/
|
||||||
|
void ( * handler ) ( struct printf_context *ctx, unsigned int c );
|
||||||
|
/** Length of formatted string */
|
||||||
|
size_t len;
|
||||||
|
/** Buffer for formatted string (used by printf_sputc()) */
|
||||||
|
char *buf;
|
||||||
|
/** Buffer length (used by printf_sputc()) */
|
||||||
|
size_t max_len;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LCASE 0x20
|
||||||
|
#define ALT_FORM 0x02
|
||||||
|
|
||||||
|
static char * format_hex ( char *buf, unsigned long long num, int width,
|
||||||
|
int flags ) {
|
||||||
|
char *ptr = buf;
|
||||||
|
int case_mod;
|
||||||
|
|
||||||
|
/* Generate the number */
|
||||||
|
case_mod = flags & LCASE;
|
||||||
|
do {
|
||||||
|
*ptr++ = "0123456789ABCDEF"[ num & 0xf ] | case_mod;
|
||||||
|
num >>= 4;
|
||||||
|
} while ( num );
|
||||||
|
|
||||||
|
/* Zero-pad to width */
|
||||||
|
while ( ( ptr - buf ) < width )
|
||||||
|
*ptr++ = '0';
|
||||||
|
|
||||||
|
/* Add "0x" or "0X" if alternate form specified */
|
||||||
|
if ( flags & ALT_FORM ) {
|
||||||
|
*ptr++ = 'X' | case_mod;
|
||||||
|
*ptr++ = '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char * format_decimal ( char *buf, signed long num, int width ) {
|
||||||
|
char *ptr = buf;
|
||||||
|
int negative = 0;
|
||||||
|
|
||||||
|
/* Generate the number */
|
||||||
|
if ( num < 0 ) {
|
||||||
|
negative = 1;
|
||||||
|
num = -num;
|
||||||
|
}
|
||||||
|
do {
|
||||||
|
*ptr++ = '0' + ( num % 10 );
|
||||||
|
num /= 10;
|
||||||
|
} while ( num );
|
||||||
|
|
||||||
|
/* Add "-" if necessary */
|
||||||
|
if ( negative )
|
||||||
|
*ptr++ = '-';
|
||||||
|
|
||||||
|
/* Space-pad to width */
|
||||||
|
while ( ( ptr - buf ) < width )
|
||||||
|
*ptr++ = ' ';
|
||||||
|
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write a formatted string to a printf context
|
||||||
|
*
|
||||||
|
* @v ctx Context
|
||||||
* @v fmt Format string
|
* @v fmt Format string
|
||||||
* @v args Arguments corresponding to the format string
|
* @v args Arguments corresponding to the format string
|
||||||
* @ret len Length of string written to buffer (if buf != NULL)
|
* @ret len Length of formatted string
|
||||||
* @ret 0 (if buf == NULL)
|
|
||||||
* @err None -
|
|
||||||
*
|
|
||||||
* If #buf==NULL, then the string will be written to the console
|
|
||||||
* directly using putchar().
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
static int vsprintf(char *buf, const char *fmt, va_list args)
|
int vcprintf ( struct printf_context *ctx, const char *fmt, va_list args ) {
|
||||||
{
|
int flags;
|
||||||
const char *p;
|
int width;
|
||||||
char *s;
|
uint8_t *length;
|
||||||
s = buf;
|
int character;
|
||||||
for ( ; *fmt != '\0'; ++fmt) {
|
unsigned long long hex;
|
||||||
if (*fmt != '%') {
|
signed long decimal;
|
||||||
buf ? *s++ = *fmt : putchar(*fmt);
|
char num_buf[32];
|
||||||
|
char *ptr;
|
||||||
|
|
||||||
|
/* Initialise context */
|
||||||
|
ctx->len = 0;
|
||||||
|
|
||||||
|
for ( ; *fmt ; fmt++ ) {
|
||||||
|
/* Pass through ordinary characters */
|
||||||
|
if ( *fmt != '%' ) {
|
||||||
|
ctx->handler ( ctx, *fmt );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* skip width specs */
|
|
||||||
fmt++;
|
fmt++;
|
||||||
while (*fmt >= '0' && *fmt <= '9')
|
/* Process flag characters */
|
||||||
fmt++;
|
flags = 0;
|
||||||
if (*fmt == '.')
|
for ( ; ; fmt++ ) {
|
||||||
fmt++;
|
if ( *fmt == '#' ) {
|
||||||
while (*fmt >= '0' && *fmt <= '9')
|
flags |= ALT_FORM;
|
||||||
fmt++;
|
} else if ( *fmt == '0' ) {
|
||||||
if (*fmt == 's') {
|
/* We always 0-pad hex and space-pad decimal */
|
||||||
for(p = va_arg(args, char *); *p != '\0'; p++)
|
} else {
|
||||||
buf ? *s++ = *p : putchar(*p);
|
/* End of flag characters */
|
||||||
} else if (*fmt == 'm') {
|
break;
|
||||||
for(p = strerror(errno); *p != '\0'; p++)
|
|
||||||
buf ? *s++ = *p : putchar(*p);
|
|
||||||
} else { /* Length of item is bounded */
|
|
||||||
char tmp[40], *q = tmp;
|
|
||||||
int alt = 0;
|
|
||||||
int shift = INT_SHIFT;
|
|
||||||
if (*fmt == '#') {
|
|
||||||
alt = 1;
|
|
||||||
fmt++;
|
|
||||||
}
|
}
|
||||||
if (*fmt == 'l') {
|
}
|
||||||
shift = LONG_SHIFT;
|
/* Process field width */
|
||||||
fmt++;
|
width = 0;
|
||||||
|
for ( ; ; fmt++ ) {
|
||||||
|
if ( ( ( unsigned ) ( *fmt - '0' ) ) < 10 ) {
|
||||||
|
width = ( width * 10 ) + ( *fmt - '0' );
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (*fmt == 'l') {
|
}
|
||||||
shift = LONGLONG_SHIFT;
|
/* We don't do floating point */
|
||||||
fmt++;
|
/* Process length modifier */
|
||||||
|
length = &type_sizes[INT_LEN];
|
||||||
|
for ( ; ; fmt++ ) {
|
||||||
|
if ( *fmt == 'h' ) {
|
||||||
|
length--;
|
||||||
|
} else if ( *fmt == 'l' ) {
|
||||||
|
length++;
|
||||||
|
} else if ( *fmt == 'z' ) {
|
||||||
|
length = &type_sizes[SIZE_T_LEN];
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (*fmt == 'h') {
|
}
|
||||||
shift = SHRT_SHIFT;
|
/* Process conversion specifier */
|
||||||
fmt++;
|
if ( *fmt == 'c' ) {
|
||||||
if (*fmt == 'h') {
|
character = va_arg ( args, unsigned int );
|
||||||
shift = CHAR_SHIFT;
|
ctx->handler ( ctx, character );
|
||||||
fmt++;
|
} else if ( *fmt == 's' ) {
|
||||||
}
|
ptr = va_arg ( args, char * );
|
||||||
|
for ( ; *ptr ; ptr++ ) {
|
||||||
|
ctx->handler ( ctx, *ptr );
|
||||||
}
|
}
|
||||||
|
} else if ( *fmt == 'p' ) {
|
||||||
/*
|
hex = ( intptr_t ) va_arg ( args, void * );
|
||||||
* Before each format q points to tmp buffer
|
ptr = format_hex ( num_buf, hex, width,
|
||||||
* After each format q points past end of item
|
( ALT_FORM | LCASE ) );
|
||||||
*/
|
do {
|
||||||
if ((*fmt | 0x20) == 'x') {
|
ctx->handler ( ctx, *(--ptr) );
|
||||||
/* With x86 gcc, sizeof(long) == sizeof(int) */
|
} while ( ptr != num_buf );
|
||||||
unsigned long h;
|
} else if ( ( *fmt & ~0x20 ) == 'X' ) {
|
||||||
int ncase;
|
flags |= ( *fmt & 0x20 ); /* LCASE */
|
||||||
if (shift > LONG_SHIFT) {
|
if ( *length >= sizeof ( unsigned long long ) ) {
|
||||||
h = va_arg(args, unsigned long long);
|
hex = va_arg ( args, unsigned long long );
|
||||||
} else if (shift > INT_SHIFT) {
|
} else if ( *length >= sizeof ( unsigned long ) ) {
|
||||||
h = va_arg(args, unsigned long);
|
hex = va_arg ( args, unsigned long );
|
||||||
} else {
|
} else {
|
||||||
h = va_arg(args, unsigned int);
|
hex = va_arg ( args, unsigned int );
|
||||||
}
|
|
||||||
ncase = (*fmt & 0x20);
|
|
||||||
if (alt) {
|
|
||||||
*q++ = '0';
|
|
||||||
*q++ = 'X' | ncase;
|
|
||||||
}
|
|
||||||
for ( ; shift >= 0; shift -= 4)
|
|
||||||
*q++ = "0123456789ABCDEF"[(h >> shift) & 0xF] | ncase;
|
|
||||||
}
|
}
|
||||||
else if (*fmt == 'd') {
|
ptr = format_hex ( num_buf, hex, width, flags );
|
||||||
char *r, *t;
|
do {
|
||||||
long i;
|
ctx->handler ( ctx, *(--ptr) );
|
||||||
if (shift > LONG_SHIFT) {
|
} while ( ptr != num_buf );
|
||||||
i = va_arg(args, long long);
|
} else if ( *fmt == 'd' ) {
|
||||||
} else if (shift > INT_SHIFT) {
|
if ( *length >= sizeof ( signed long ) ) {
|
||||||
i = va_arg(args, long);
|
decimal = va_arg ( args, signed long );
|
||||||
} else {
|
} else {
|
||||||
i = va_arg(args, int);
|
decimal = va_arg ( args, signed int );
|
||||||
}
|
|
||||||
if (i < 0) {
|
|
||||||
*q++ = '-';
|
|
||||||
i = -i;
|
|
||||||
}
|
|
||||||
t = q; /* save beginning of digits */
|
|
||||||
do {
|
|
||||||
*q++ = '0' + (i % 10);
|
|
||||||
i /= 10;
|
|
||||||
} while (i);
|
|
||||||
/* reverse digits, stop in middle */
|
|
||||||
r = q; /* don't alter q */
|
|
||||||
while (--r > t) {
|
|
||||||
i = *r;
|
|
||||||
*r = *t;
|
|
||||||
*t++ = i;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (*fmt == '@') {
|
ptr = format_decimal ( num_buf, decimal, width );
|
||||||
unsigned char *r;
|
do {
|
||||||
union {
|
ctx->handler ( ctx, *(--ptr) );
|
||||||
uint32_t l;
|
} while ( ptr != num_buf );
|
||||||
unsigned char c[4];
|
} else {
|
||||||
} u;
|
ctx->handler ( ctx, *fmt );
|
||||||
u.l = va_arg(args, uint32_t);
|
|
||||||
for (r = &u.c[0]; r < &u.c[4]; ++r)
|
|
||||||
q += sprintf(q, "%d.", *r);
|
|
||||||
--q;
|
|
||||||
}
|
|
||||||
else if (*fmt == '!') {
|
|
||||||
const char *r;
|
|
||||||
p = va_arg(args, char *);
|
|
||||||
for (r = p + ETH_ALEN; p < r; ++p)
|
|
||||||
q += sprintf(q, "%hhX:", *p);
|
|
||||||
--q;
|
|
||||||
}
|
|
||||||
else if (*fmt == 'c')
|
|
||||||
*q++ = va_arg(args, int);
|
|
||||||
else
|
|
||||||
*q++ = *fmt;
|
|
||||||
/* now output the saved string */
|
|
||||||
for (p = tmp; p < q; ++p)
|
|
||||||
buf ? *s++ = *p : putchar(*p);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (buf)
|
|
||||||
*s = '\0';
|
return ctx->len;
|
||||||
return (s - buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a formatted string to a buffer.
|
* Write character to buffer
|
||||||
*
|
|
||||||
* @v buf Buffer into which to write the string, or NULL
|
|
||||||
* @v fmt Format string
|
|
||||||
* @v ... Arguments corresponding to the format string
|
|
||||||
* @ret len Length of string written to buffer (if buf != NULL)
|
|
||||||
* @ret 0 (if buf == NULL)
|
|
||||||
* @err None -
|
|
||||||
*
|
|
||||||
* If #buf==NULL, then the string will be written to the console
|
|
||||||
* directly using putchar().
|
|
||||||
*
|
*
|
||||||
|
* @v ctx Context
|
||||||
|
* @v c Character
|
||||||
*/
|
*/
|
||||||
int sprintf(char *buf, const char *fmt, ...)
|
static void printf_sputc ( struct printf_context *ctx, unsigned int c ) {
|
||||||
{
|
if ( ++ctx->len < ctx->max_len )
|
||||||
va_list args;
|
ctx->buf[ctx->len-1] = c;
|
||||||
int i;
|
|
||||||
va_start(args, fmt);
|
|
||||||
i=vsprintf(buf, fmt, args);
|
|
||||||
va_end(args);
|
|
||||||
return i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#warning "Remove this buffer-overflow-in-waiting at some point"
|
/**
|
||||||
|
* Write a formatted string to a buffer
|
||||||
|
*
|
||||||
|
* @v buf Buffer into which to write the string
|
||||||
|
* @v size Size of buffer
|
||||||
|
* @v fmt Format string
|
||||||
|
* @v args Arguments corresponding to the format string
|
||||||
|
* @ret len Length of formatted string
|
||||||
|
*
|
||||||
|
* If the buffer is too small to contain the string, the returned
|
||||||
|
* length is the length that would have been written had enough space
|
||||||
|
* been available.
|
||||||
|
*/
|
||||||
|
int vsnprintf ( char *buf, size_t size, const char *fmt, va_list args ) {
|
||||||
|
struct printf_context ctx;
|
||||||
|
int len;
|
||||||
|
|
||||||
|
/* Ensure last byte is NUL if a size is specified. This
|
||||||
|
* catches the case of the buffer being too small, in which
|
||||||
|
* case a trailing NUL would not otherwise be added.
|
||||||
|
*/
|
||||||
|
if ( size != PRINTF_NO_LENGTH )
|
||||||
|
buf[size-1] = '\0';
|
||||||
|
|
||||||
|
/* Hand off to vcprintf */
|
||||||
|
ctx.handler = printf_sputc;
|
||||||
|
ctx.buf = buf;
|
||||||
|
ctx.max_len = size;
|
||||||
|
len = vcprintf ( &ctx, fmt, args );
|
||||||
|
|
||||||
|
/* Add trailing NUL */
|
||||||
|
printf_sputc ( &ctx, '\0' );
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write a formatted string to a buffer
|
||||||
|
*
|
||||||
|
* @v buf Buffer into which to write the string
|
||||||
|
* @v size Size of buffer
|
||||||
|
* @v fmt Format string
|
||||||
|
* @v ... Arguments corresponding to the format string
|
||||||
|
* @ret len Length of formatted string
|
||||||
|
*/
|
||||||
int snprintf ( char *buf, size_t size, const char *fmt, ... ) {
|
int snprintf ( char *buf, size_t size, const char *fmt, ... ) {
|
||||||
va_list args;
|
va_list args;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
va_start ( args, fmt );
|
va_start ( args, fmt );
|
||||||
i = vsprintf ( buf, fmt, args );
|
i = vsnprintf ( buf, size, fmt, args );
|
||||||
va_end ( args );
|
va_end ( args );
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write character to console
|
||||||
|
*
|
||||||
|
* @v ctx Context
|
||||||
|
* @v c Character
|
||||||
|
*/
|
||||||
|
static void printf_putchar ( struct printf_context *ctx, unsigned int c ) {
|
||||||
|
++ctx->len;
|
||||||
|
putchar ( c );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write a formatted string to the console
|
||||||
|
*
|
||||||
|
* @v fmt Format string
|
||||||
|
* @v args Arguments corresponding to the format string
|
||||||
|
* @ret len Length of formatted string
|
||||||
|
*/
|
||||||
|
int vprintf ( const char *fmt, va_list args ) {
|
||||||
|
struct printf_context ctx;
|
||||||
|
|
||||||
|
/* Hand off to vcprintf */
|
||||||
|
ctx.handler = printf_putchar;
|
||||||
|
return vcprintf ( &ctx, fmt, args );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a formatted string to the console.
|
* Write a formatted string to the console.
|
||||||
*
|
*
|
||||||
* @v fmt Format string
|
* @v fmt Format string
|
||||||
* @v ... Arguments corresponding to the format string
|
* @v ... Arguments corresponding to the format string
|
||||||
* @ret None -
|
* @ret len Length of formatted string
|
||||||
* @err None -
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
int printf(const char *fmt, ...)
|
int printf ( const char *fmt, ... ) {
|
||||||
{
|
|
||||||
va_list args;
|
va_list args;
|
||||||
int i;
|
int i;
|
||||||
va_start(args, fmt);
|
|
||||||
i=vsprintf(0, fmt, args);
|
va_start ( args, fmt );
|
||||||
va_end(args);
|
i = vprintf ( fmt, args );
|
||||||
|
va_end ( args );
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,40 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int sprintf ( char *buf, const char *fmt, ... );
|
#include <stdarg.h>
|
||||||
extern int snprintf ( char *buf, size_t size, const char *fmt, ... );
|
|
||||||
extern int printf ( const char *fmt, ... );
|
#define PRINTF_NO_LENGTH ( ( size_t ) -1 )
|
||||||
|
|
||||||
|
extern int vsnprintf ( char *buf, size_t size, const char *fmt, va_list args );
|
||||||
|
extern int vprintf ( const char *fmt, va_list args );
|
||||||
|
|
||||||
|
extern int __attribute__ (( format ( printf, 3, 4 ) ))
|
||||||
|
snprintf ( char *buf, size_t size, const char *fmt, ... );
|
||||||
|
|
||||||
|
extern int __attribute__ (( format ( printf, 1, 2 ) ))
|
||||||
|
printf ( const char *fmt, ... );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write a formatted string to a buffer
|
||||||
|
*
|
||||||
|
* @v buf Buffer into which to write the string
|
||||||
|
* @v fmt Format string
|
||||||
|
* @v ... Arguments corresponding to the format string
|
||||||
|
* @ret len Length of formatted string
|
||||||
|
*/
|
||||||
|
#define sprintf( buf, fmt, ... ) \
|
||||||
|
snprintf ( (buf), PRINTF_NO_LENGTH, (fmt), ## __VA_ARGS__ )
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write a formatted string to a buffer
|
||||||
|
*
|
||||||
|
* @v buf Buffer into which to write the string
|
||||||
|
* @v fmt Format string
|
||||||
|
* @v args Arguments corresponding to the format string
|
||||||
|
* @ret len Length of formatted string
|
||||||
|
*/
|
||||||
|
static inline int vsprintf ( char *buf, const char *fmt, va_list args ) {
|
||||||
|
return vsnprintf ( buf, PRINTF_NO_LENGTH, fmt, args );
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* VSPRINTF_H */
|
#endif /* VSPRINTF_H */
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <vsprintf.h>
|
||||||
#include <gpxe/if_arp.h>
|
#include <gpxe/if_arp.h>
|
||||||
#include <gpxe/if_ether.h>
|
#include <gpxe/if_ether.h>
|
||||||
#include <gpxe/netdevice.h>
|
#include <gpxe/netdevice.h>
|
||||||
|
|
Loading…
Reference in New Issue