]> rtime.felk.cvut.cz Git - frescor/frsh.git/blobdiff - resources/dummy/frm_dummy.c
forb: added scripts executing dynamic shared libraries
[frescor/frsh.git] / resources / dummy / frm_dummy.c
index 1314d03ff5c46701b27b3cd0344a072c0993a2ea..441f9b10e5bea0105b7cc1fc176fd659fc1c6131 100644 (file)
@@ -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 <resource id>    Use a different id that the default (%d)\n", DUMMY_RESOURCE_ID);*/
+       printf("  -i, --id <resource id>    Use a different id that the default (%d)\n", DUMMY_RESOURCE_ID);
        printf("  -h, --help         Display this help\n");
        printf("  -l, --loglevel <number>|<domain>=<number>,...\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;