diff options
author | Michael Brown | 2013-07-12 22:28:00 +0200 |
---|---|---|
committer | Michael Brown | 2013-07-12 22:38:19 +0200 |
commit | 3dbcce51eaa3de66c945628676d9303aca5a98fd (patch) | |
tree | f45fe0eb90208425f68b14e72bd7cf2981be3027 /src/tests | |
parent | [netdevice] Add "bustype" and "busloc" settings (diff) | |
download | ipxe-3dbcce51eaa3de66c945628676d9303aca5a98fd.tar.gz ipxe-3dbcce51eaa3de66c945628676d9303aca5a98fd.tar.xz ipxe-3dbcce51eaa3de66c945628676d9303aca5a98fd.zip |
[settings] Add "busdevfn" setting type
Allow network device's "busloc" setting to be formatted as a PCI
bus:dev.fn address using e.g. ${net0/busloc:busdevfn}.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/settings_test.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tests/settings_test.c b/src/tests/settings_test.c index d6d12574..42957c7d 100644 --- a/src/tests/settings_test.c +++ b/src/tests/settings_test.c @@ -182,6 +182,12 @@ static struct setting test_uuid_setting = { .type = &setting_type_uuid, }; +/** Test PCI bus:dev.fn setting type */ +static struct setting test_busdevfn_setting = { + .name = "test_busdevfn", + .type = &setting_type_busdevfn, +}; + /** * Perform settings self-tests * @@ -282,6 +288,10 @@ static void settings_test_exec ( void ) { 0x7a, 0x7c, 0xfe, 0x4f, 0xca, 0x4a, 0x57 ), "1a6a749d-0eda-461a-a87a-7cfe4fca4a57" ); + /* "busdevfn" setting type (no store capability) */ + fetchf_ok ( &test_settings, &test_busdevfn_setting, + RAW ( 0x03, 0x45 ), "03:08.5" ); + /* Clear and unregister test settings block */ clear_settings ( &test_settings ); unregister_settings ( &test_settings ); |