X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/frsh.git/blobdiff_plain/7d666a843fb3c7a3970448f17fc66a0a855411d1..cc05b3a52be846cc9697651777d7e8e0e40266d8:/resources/dummy/frm_dummy.c diff --git a/resources/dummy/frm_dummy.c b/resources/dummy/frm_dummy.c index 1314d03..441f9b1 100644 --- a/resources/dummy/frm_dummy.c +++ b/resources/dummy/frm_dummy.c @@ -163,7 +163,7 @@ static struct fres_res_manager frm = { static struct option long_opts[] = { { "loglevel", 1, 0, 'l' }, -// { "id", required_argument, 0, 'i' }, + { "id", required_argument, 0, 'i' }, { "accept-all", 0, 0, 'a' }, { "help", 0, 0, 'h' }, { 0, 0, 0, 0} @@ -175,7 +175,7 @@ usage(void) printf("usage: frm_dummy [ options ]\n"); printf(" -a, --accept-all Accepts all contracts\n"); printf(" -d, --daemon [pid-file] go to background after FORB initialization\n"); -/* printf(" -i, --id Use a different id that the default (%d)\n", DUMMY_RESOURCE_ID);*/ + printf(" -i, --id Use a different id that the default (%d)\n", DUMMY_RESOURCE_ID); printf(" -h, --help Display this help\n"); printf(" -l, --loglevel |=,...\n"); } @@ -183,7 +183,6 @@ usage(void) int forb_main(forb_orb orb, int argc, char *argv[]) { int ret; - forb_init_attr_t attr = { .orb_id = "org.frescor.frm.dummy" }; int opt; while ((opt = getopt_long(argc, argv, "ai:l:h", &long_opts[0], NULL)) != EOF) { @@ -194,9 +193,9 @@ int forb_main(forb_orb orb, int argc, char *argv[]) opt_daemon = true; opt_pidfile = optarg; break; -// case 'i': -// opt_res_id = atoi(optarg); -// break; + case 'i': + opt_res_id = atoi(optarg); + break; case 'l': ul_log_domain_arg2levels(optarg); break;