summaryrefslogtreecommitdiffstats
path: root/src/tests/iscsiboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/iscsiboot.c')
-rw-r--r--src/tests/iscsiboot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/iscsiboot.c b/src/tests/iscsiboot.c
index 21a1b58ed..f7cf8b741 100644
--- a/src/tests/iscsiboot.c
+++ b/src/tests/iscsiboot.c
@@ -32,7 +32,7 @@ int test_iscsiboot ( const char *initiator_iqn,
printf ( "Initialising %s\n", target_iqn );
if ( ( rc = init_iscsidev ( &test_iscsidev ) ) != 0 ) {
printf ( "Could not reach %s: %s\n", target_iqn,
- strerror ( errno ) );
+ strerror ( rc ) );
return rc;
}
ibft_fill_data ( netdev, initiator_iqn, target, target_iqn );
@@ -49,5 +49,7 @@ int test_iscsiboot ( const char *initiator_iqn,
printf ( "Unregistering BIOS drive %#02x\n", drive.drive );
unregister_int13_drive ( &drive );
+ fini_iscsidev ( &test_iscsidev );
+
return rc;
}