From e0ad54dd46569b5e458143a7836ada5be6223261 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Wed, 19 Sep 2012 13:58:03 +0000 Subject: [PATCH] updated getting detector mac address for gotthard git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@262 951219d9-93cf-4727-9268-0efd64621fa3 --- .../gotthardDetectorServer/firmware_funcs.c | 43 ++++++------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index ee924fabe..46455d691 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -706,35 +706,20 @@ int setContinousReadOut(int d) { u_int64_t getDetectorNumber() { - - FILE *fp=NULL; - u_int64_t res; - char line[150]; - int a[6]; - - int n=0, i; - //u_int64_t a0,a1,a2,a3,a4,a5,n=0; - fp=fopen("/etc/conf.d/mac","r"); - if (fp==NULL) { - printf("could not ope MAC file\n");; - return -1; - } - while (fgets(line,150,fp)) { - //MAC="00:40:8C:CD:00:00" - printf(line); - if (strstr(line,"MAC=")) - n=sscanf(line,"MAC=\"%x:%x:%x:%x:%x:%x\"",a+5,a+4,a+3,a+2,a+1,a); - } - fclose(fp); - if (n!=6){ - printf("could not scan MAC address\n");; - return -1; - } - res=0; - for (i=0; i