* gotthard config file path using readlink

* gotthard2

* eiger

* eieger, mnythen3, moench

* binaries in

* moved readlink to a common function

* binaries in
This commit is contained in:
Dhanya Thattil
2020-07-23 12:17:46 +02:00
committed by GitHub
parent beb6afe101
commit ad297e9c51
15 changed files with 73 additions and 15 deletions

View File

@ -3,6 +3,7 @@
#include "clogger.h"
#include "sharedMemory.h"
#include "versionAPI.h"
#include "common.h"
#include "LTC2620.h" // dacs
#ifdef VIRTUAL
@ -577,10 +578,15 @@ void setGbitReadout() {
}
int readConfigFile() {
char fname[128];
if (getAbsPath(fname, 128, CONFIG_FILE) == FAIL) {
return FAIL;
}
// open config file
FILE *fd = fopen(CONFIG_FILE, "r");
FILE *fd = fopen(fname, "r");
if (fd == NULL) {
LOG(logWARNING, ("\tCould not find config file %s\n", CONFIG_FILE));
LOG(logWARNING, ("Could not find config file %s\n", CONFIG_FILE));
return FAIL;
}
LOG(logINFO, ("\tConfig file %s opened\n", CONFIG_FILE));