mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
xen: introduce xenbus_read_unsigned()
There are multiple instances of code reading an optional unsigned parameter from Xenstore via xenbus_scanf(). Instead of repeating the same code over and over add a service function doing the job. Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: David Vrabel <[email protected]>
This commit is contained in:
parent
bc33b0ca11
commit
9c53a1792a
2 changed files with 19 additions and 0 deletions
|
|
@ -151,6 +151,10 @@ __scanf(4, 5)
|
|||
int xenbus_scanf(struct xenbus_transaction t,
|
||||
const char *dir, const char *node, const char *fmt, ...);
|
||||
|
||||
/* Read an (optional) unsigned value. */
|
||||
unsigned int xenbus_read_unsigned(const char *dir, const char *node,
|
||||
unsigned int default_val);
|
||||
|
||||
/* Single printf and write: returns -errno or 0. */
|
||||
__printf(4, 5)
|
||||
int xenbus_printf(struct xenbus_transaction t,
|
||||
|
|
|
|||
Loading…
Reference in a new issue