drivertool: fix device names, add backwards compatibility

Origin commit data
------------------
Branch: ni/coolstream
Commit: 0219f7f135
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-12 (Sun, 12 May 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-05-12 17:09:52 +02:00
parent a814143847
commit 655e8fa6a3

View File

@@ -137,8 +137,8 @@ static struct ioctl_list n[] = {
static const char *devices[2] = static const char *devices[2] =
{ {
"/dev/cs_display", "/dev/display",
"/dev/cs_ir" "/dev/input/nevis_ir"
}; };
void usage(void) void usage(void)
@@ -234,7 +234,9 @@ int main(int argc, char **argv)
} }
ret = 0; ret = 0;
while (n[i].text != NULL && strcmp(n[i].text, argv[1]) != 0) /* allow the old VFD_ names for backwards compatibility */
while (n[i].text != NULL && strcmp(n[i].text, argv[1]) != 0 &&
!(strncmp(argv[1], "VFD_", 4) == 0 && strcmp(n[i].text + 2, argv[1] + 3) == 0))
i++; i++;
if (!n[i].text || (n[i].type != TYPE_UINT_GET && argc < 3)) if (!n[i].text || (n[i].type != TYPE_UINT_GET && argc < 3))