1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-17 21:09:21 +02:00

libatrf: new function atrf_default_driver_name to get the default driver name

- include/atrf.h (atrf_default_driver_name),
  lib/atrf.c (atrf_default_driver_name): return the name of the default
  driver, or "none" if no drivers are defined
This commit is contained in:
Werner Almesberger 2011-04-09 22:35:29 -03:00
parent 1830454b49
commit 54edf17a1e
2 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,7 @@ struct atrf_dsc;
void *atrf_usb_handle(struct atrf_dsc *dsc); /* hack for atrf-id */
const char *atrf_default_driver_name(void);
struct atrf_dsc *atrf_open(const char *arg);
void atrf_close(struct atrf_dsc *dsc);

View File

@ -97,6 +97,12 @@ const static struct atrf_driver *drivers[] = {
};
const char *atrf_default_driver_name(void)
{
return drivers[0] ? drivers[0]->name : "none";
}
static const struct atrf_driver *select_driver(const char *arg,
const char **opt)
{