mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-29 13:11:54 +02:00
tools/lib/: make driver name matching case-sensitive and lower-case names
Case-sensitive is the Unix way, and so is avoiding unnecessary upper-case. - atben.c (atben_driver): changed name from "Ben" to "ben" - atusb.c (atusb_driver): changed name from "USB" to "usb" - atrf.c (select_driver): made driver name matching case-sensitive
This commit is contained in:
parent
5296fc8cf5
commit
adc14c4742
@ -355,7 +355,7 @@ static int atben_interrupt(void *handle)
|
|||||||
|
|
||||||
|
|
||||||
struct atrf_driver atben_driver = {
|
struct atrf_driver atben_driver = {
|
||||||
.name = "Ben",
|
.name = "ben",
|
||||||
.open = atben_open,
|
.open = atben_open,
|
||||||
.close = atben_close,
|
.close = atben_close,
|
||||||
.reset = NULL,
|
.reset = NULL,
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h> /* for strcasecmp */
|
|
||||||
|
|
||||||
#include "at86rf230.h"
|
#include "at86rf230.h"
|
||||||
|
|
||||||
@ -120,7 +119,7 @@ static const struct atrf_driver *select_driver(const char *arg,
|
|||||||
end = strchr(arg, 0);
|
end = strchr(arg, 0);
|
||||||
len = arg-end;
|
len = arg-end;
|
||||||
for (drv = drivers; *drv; drv++)
|
for (drv = drivers; *drv; drv++)
|
||||||
if (!strncasecmp((*drv)->name, arg, len) &&
|
if (!strncmp((*drv)->name, arg, len) &&
|
||||||
strlen((*drv)->name) == len)
|
strlen((*drv)->name) == len)
|
||||||
break;
|
break;
|
||||||
if (!*drv) {
|
if (!*drv) {
|
||||||
|
@ -273,7 +273,7 @@ static int atusb_set_clkm(void *dsc, int mhz)
|
|||||||
|
|
||||||
|
|
||||||
struct atrf_driver atusb_driver = {
|
struct atrf_driver atusb_driver = {
|
||||||
.name = "USB",
|
.name = "usb",
|
||||||
.open = atusb_open,
|
.open = atusb_open,
|
||||||
.close = atusb_close,
|
.close = atusb_close,
|
||||||
.error = atusb_error,
|
.error = atusb_error,
|
||||||
|
Loading…
Reference in New Issue
Block a user