diff options
author | Michael Brown | 2017-03-26 14:42:52 +0200 |
---|---|---|
committer | Michael Brown | 2017-03-26 15:03:29 +0200 |
commit | c212597336fd055de854043b83425cbdf1f42603 (patch) | |
tree | db048ce647b51e1c69c03f3cae8041ceedcde66f /src/include | |
parent | [scsi] Avoid duplicate call to scsicmd_close() on TEST UNIT READY failure (diff) | |
download | ipxe-c212597336fd055de854043b83425cbdf1f42603.tar.gz ipxe-c212597336fd055de854043b83425cbdf1f42603.tar.xz ipxe-c212597336fd055de854043b83425cbdf1f42603.zip |
[block] Add dummy SAN device
Add a dummy SAN device which allows the "sanhook" command to be tested
even when no SAN booting capability is present on the platform. This
allows substantial portions of the SAN boot code to be run in Linux
under Valgrind.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ipxe/dummy_sanboot.h | 18 | ||||
-rw-r--r-- | src/include/ipxe/errfile.h | 1 | ||||
-rw-r--r-- | src/include/ipxe/sanboot.h | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/include/ipxe/dummy_sanboot.h b/src/include/ipxe/dummy_sanboot.h new file mode 100644 index 00000000..9c9d942a --- /dev/null +++ b/src/include/ipxe/dummy_sanboot.h @@ -0,0 +1,18 @@ +#ifndef _IPXE_DUMMY_SANBOOT_H +#define _IPXE_DUMMY_SANBOOT_H + +/** @file + * + * Dummy SAN device + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#ifdef SANBOOT_DUMMY +#define SANBOOT_PREFIX_dummy +#else +#define SANBOOT_PREFIX_dummy __dummy_ +#endif + +#endif /* _IPXE_DUMMY_SANBOOT_H */ diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index cd5c1959..703f4565 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -73,6 +73,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define ERRFILE_pixbuf ( ERRFILE_CORE | 0x00210000 ) #define ERRFILE_efi_block ( ERRFILE_CORE | 0x00220000 ) #define ERRFILE_sanboot ( ERRFILE_CORE | 0x00230000 ) +#define ERRFILE_dummy_sanboot ( ERRFILE_CORE | 0x00240000 ) #define ERRFILE_eisa ( ERRFILE_DRIVER | 0x00000000 ) #define ERRFILE_isa ( ERRFILE_DRIVER | 0x00010000 ) diff --git a/src/include/ipxe/sanboot.h b/src/include/ipxe/sanboot.h index 3e7ed1c8..c2e57f71 100644 --- a/src/include/ipxe/sanboot.h +++ b/src/include/ipxe/sanboot.h @@ -90,6 +90,7 @@ struct san_device { /* Include all architecture-independent sanboot API headers */ #include <ipxe/null_sanboot.h> +#include <ipxe/dummy_sanboot.h> #include <ipxe/efi/efi_block.h> /* Include all architecture-dependent sanboot API headers */ |