[POWERPC] Add rtas_service_present() helper
To test for the existence of an RTAS function, we typically do: foo_token = rtas_token("foo"); if (foo_token == RTAS_UNKNOWN_SERVICE) return; Add a rtas_service_present method, which provides a more conventional boolean interface for testing the existence of an RTAS method. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
9d9d868ecf
commit
f2d6d2d8bb
@@ -303,6 +303,12 @@ int rtas_token(const char *service)
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_token);
|
||||
|
||||
int rtas_service_present(const char *service)
|
||||
{
|
||||
return rtas_token(service) != RTAS_UNKNOWN_SERVICE;
|
||||
}
|
||||
EXPORT_SYMBOL(rtas_service_present);
|
||||
|
||||
#ifdef CONFIG_RTAS_ERROR_LOGGING
|
||||
/*
|
||||
* Return the firmware-specified size of the error log buffer
|
||||
|
Reference in New Issue
Block a user