FreeCalypso > hg > fc-usbser-tools
view fteeprom/filesearch.c @ 105:1e820ed0904e
Installed-binaries: list of binaries installed by this package
I am establishing a new convention for all FreeCalypso tools, across
different packages and source repositories: each FC tools package
will have a file name Installed-binaries listing all user-invokable
binaries that package installs in /opt/freecalypso/bin. These files
are to serve as an aid to users and distro package maintainers who
prefer to not add /opt/freecalypso/bin to their PATH. The alternative
to adding this directory to PATH is to create a symlink for every
installed binary in some standard location such as /usr/bin or
/usr/local/bin, pointing to the actual binary in /opt/freecalypso/bin;
having a list of all FC-installed binaries in a standardized format
will allow this process to be automated.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 29 Sep 2023 19:42:53 +0000 |
parents | b2c891299e83 |
children |
line wrap: on
line source
/* * This module implements the function that searches for FTDI EEPROM config * files in a dedicated installation directory. It is based on the version * in fc-sim-tools that looks in the sim-scripts directory. */ #include <stdio.h> #include <string.h> #include <strings.h> static char ftdi_install_dir[] = "/opt/freecalypso/ftdi"; FILE * open_eeprom_config_file(req_filename) char *req_filename; { char pathbuf[256]; FILE *f; if (!index(req_filename, '/') && strlen(req_filename) < 128) { sprintf(pathbuf, "%s/%s", ftdi_install_dir, req_filename); f = fopen(pathbuf, "r"); if (f) return f; } f = fopen(req_filename, "r"); return f; }