Commit 327b9a8b authored by Romain Beurdouche's avatar Romain Beurdouche

fix(phy_simulators): enable the use of option -O to pass a configuration file...

fix(phy_simulators): enable the use of option -O to pass a configuration file to configmodule in phy simulators
parent a476e181
...@@ -430,11 +430,11 @@ int main(int argc, char *argv[]) ...@@ -430,11 +430,11 @@ int main(int argc, char *argv[])
} }
logInit(); logInit();
while ((c = getopt (argc, argv, "--:q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1) { while ((c = getopt (argc, argv, "--:O:q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
...@@ -38,11 +38,11 @@ int main(int argc, char *argv[]) ...@@ -38,11 +38,11 @@ int main(int argc, char *argv[])
} }
logInit(); logInit();
while ((arguments = getopt (argc, argv, "--:s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) { while ((arguments = getopt (argc, argv, "--:O:s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (arguments == 1 || arguments == '-') if (arguments == 1 || arguments == '-' || arguments == 'O')
continue; continue;
printf("handling optarg %c\n",arguments); printf("handling optarg %c\n",arguments);
......
...@@ -32,11 +32,11 @@ int main(int argc, char *argv[]) ...@@ -32,11 +32,11 @@ int main(int argc, char *argv[])
} }
logInit(); logInit();
while ((arguments = getopt(argc, argv, "--:s:d:f:l:i:mhg")) != -1) { while ((arguments = getopt(argc, argv, "--:O:s:d:f:l:i:mhg")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (arguments == 1 || arguments == '-') if (arguments == 1 || arguments == '-' || arguments == 'O')
continue; continue;
printf("handling optarg %c\n",arguments); printf("handling optarg %c\n",arguments);
......
...@@ -146,11 +146,11 @@ int main(int argc, char **argv) ...@@ -146,11 +146,11 @@ int main(int argc, char **argv)
// logInit(); // logInit();
randominit(0); randominit(0);
while ((c = getopt(argc, argv, "--:df:hpVg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:X:")) != -1) { while ((c = getopt(argc, argv, "--:O:df:hpVg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:X:")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
...@@ -336,11 +336,11 @@ int main(int argc, char **argv) ...@@ -336,11 +336,11 @@ int main(int argc, char **argv)
FILE *scg_fd=NULL; FILE *scg_fd=NULL;
while ((c = getopt(argc, argv, "--:f:hA:p:f:g:i:n:s:S:t:v:x:y:z:o:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y:Z:c")) != -1) { while ((c = getopt(argc, argv, "--:O:f:hA:p:f:g:i:n:s:S:t:v:x:y:z:o:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y:Z:c")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
...@@ -244,11 +244,11 @@ int main(int argc, char **argv) ...@@ -244,11 +244,11 @@ int main(int argc, char **argv)
exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n"); exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n");
} }
while ((c = getopt (argc, argv, "--:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { while ((c = getopt (argc, argv, "--:O:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) {
/* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
...@@ -164,11 +164,11 @@ int main(int argc, char **argv){ ...@@ -164,11 +164,11 @@ int main(int argc, char **argv){
randominit(0); randominit(0);
while ((c = getopt (argc, argv, "--:hHaA:Cc:l:r:p:g:m:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:E")) != -1) { while ((c = getopt (argc, argv, "--:O:hHaA:Cc:l:r:p:g:m:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:E")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
...@@ -313,11 +313,11 @@ int main(int argc, char **argv) ...@@ -313,11 +313,11 @@ int main(int argc, char **argv)
randominit(0); randominit(0);
while ((c = getopt(argc, argv, "--:c:hn:o:s:FIL:N:R:S:T:")) != -1) { while ((c = getopt(argc, argv, "--:O:c:hn:o:s:FIL:N:R:S:T:")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("SIDELINK PSBCH SIM: handling optarg %c\n", c); printf("SIDELINK PSBCH SIM: handling optarg %c\n", c);
......
...@@ -155,11 +155,11 @@ int main(int argc, char **argv) ...@@ -155,11 +155,11 @@ int main(int argc, char **argv)
randominit(0); randominit(0);
logInit(); logInit();
while ((c = getopt (argc, argv, "--:f:hA:f:g:i:I:P:B:b:t:T:m:n:r:o:s:S:x:y:z:N:F:GR:IL:q:cd:")) != -1) { while ((c = getopt (argc, argv, "--:O:f:hA:f:g:i:I:P:B:b:t:T:m:n:r:o:s:S:x:y:z:N:F:GR:IL:q:cd:")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
...@@ -166,11 +166,11 @@ int main(int argc, char **argv) ...@@ -166,11 +166,11 @@ int main(int argc, char **argv)
randominit(0); randominit(0);
//while ((c = getopt(argc, argv, "--:df:hpg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:")) != -1) { //while ((c = getopt(argc, argv, "--:df:hpg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:")) != -1) {
while ((c = getopt(argc, argv, "--:hg:n:s:S:py:z:M:N:R:F:m:l:q:r:W:")) != -1) { while ((c = getopt(argc, argv, "--:O:hg:n:s:S:py:z:M:N:R:F:m:l:q:r:W:")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
...@@ -223,11 +223,11 @@ int main(int argc, char *argv[]) ...@@ -223,11 +223,11 @@ int main(int argc, char *argv[])
/* initialize the sin-cos table */ /* initialize the sin-cos table */
InitSinLUT(); InitSinLUT();
while ((c = getopt(argc, argv, "--:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) { while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) {
/* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
if (c == 1 || c == '-') if (c == 1 || c == '-' || c == 'O')
continue; continue;
printf("handling optarg %c\n",c); printf("handling optarg %c\n",c);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment