mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-05 04:20:37 +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 = {
|
||||
.name = "Ben",
|
||||
.name = "ben",
|
||||
.open = atben_open,
|
||||
.close = atben_close,
|
||||
.reset = NULL,
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <strings.h> /* for strcasecmp */
|
||||
|
||||
#include "at86rf230.h"
|
||||
|
||||
@ -120,7 +119,7 @@ static const struct atrf_driver *select_driver(const char *arg,
|
||||
end = strchr(arg, 0);
|
||||
len = arg-end;
|
||||
for (drv = drivers; *drv; drv++)
|
||||
if (!strncasecmp((*drv)->name, arg, len) &&
|
||||
if (!strncmp((*drv)->name, arg, len) &&
|
||||
strlen((*drv)->name) == len)
|
||||
break;
|
||||
if (!*drv) {
|
||||
|
@ -273,7 +273,7 @@ static int atusb_set_clkm(void *dsc, int mhz)
|
||||
|
||||
|
||||
struct atrf_driver atusb_driver = {
|
||||
.name = "USB",
|
||||
.name = "usb",
|
||||
.open = atusb_open,
|
||||
.close = atusb_close,
|
||||
.error = atusb_error,
|
||||
|
Loading…
Reference in New Issue
Block a user