xenpaging: do not use DPRINTF/ERROR if xch handle is unavailable

Fix DPRINTF/ERROR usage. Both macros reference a xch variable in local scope.
If xc_interface_open fails and after xc_interface_close, both can not be used
anymore. Use standard fprintf for this case.

Remove the code to print the exit value, its not really useful.
Its a left-over for debugging from an earlier patch.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
Olaf Hering committed 2010-12-14 18:50:49 +00:00
1 parent 77f428d660
commit fd0b80d8af
1 file changed
+2 -4
+2 -4
View File
@@ -539,7 +539,7 @@ int main(int argc, char *argv[])
paging = xenpaging_init(&xch, domain_id);
if ( paging == NULL )
{
ERROR("Error initialising paging");
fprintf(stderr, "Error initialising paging");
return 1;
}
@@ -688,12 +688,10 @@ int main(int argc, char *argv[])
/* Tear down domain paging */
rc1 = xenpaging_teardown(xch, paging);
if ( rc1 != 0 )
ERROR("Error tearing down paging");
fprintf(stderr, "Error tearing down paging");
if ( rc == 0 )
rc = rc1;
DPRINTF("xenpaging exit code %d\n", rc);
return rc;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.