FreeCalypso > hg > fc-usbser-tools
comparison fteeprom/ftee-gen2232c.c @ 7:b2c891299e83
ftee-gen*: look for EEPROM config file in /opt/freecalypso/ftdi
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 04 Sep 2023 20:37:52 +0000 |
parents | 11b8a30333b3 |
children | 201503e4be18 |
comparison
equal
deleted
inserted
replaced
6:d4151cef9d95 | 7:b2c891299e83 |
---|---|
3 #include <string.h> | 3 #include <string.h> |
4 #include <strings.h> | 4 #include <strings.h> |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 | |
9 extern FILE *open_eeprom_config_file(); | |
8 | 10 |
9 char *configfile, *serial; | 11 char *configfile, *serial; |
10 | 12 |
11 u_short vid = 0x0403, pid = 0x6010; | 13 u_short vid = 0x0403, pid = 0x6010; |
12 char *manuf, *product; | 14 char *manuf, *product; |
64 FILE *inf; | 66 FILE *inf; |
65 char linebuf[1024]; | 67 char linebuf[1024]; |
66 int lineno; | 68 int lineno; |
67 char *cp, *np; | 69 char *cp, *np; |
68 | 70 |
69 inf = fopen(configfile, "r"); | 71 inf = open_eeprom_config_file(configfile); |
70 if (!inf) { | 72 if (!inf) { |
71 perror(configfile); | 73 perror(configfile); |
72 exit(1); | 74 exit(1); |
73 } | 75 } |
74 for (lineno = 1; fgets(linebuf, sizeof linebuf, inf); lineno++) { | 76 for (lineno = 1; fgets(linebuf, sizeof linebuf, inf); lineno++) { |