Fix sessiond needed checks
[lttng-tools.git] / src / bin / lttng / lttng.c
index 64f3efa446530ed61663c9434eb77251cc923c91..57927d4f3d301f87ceb11a0ec85ea489b4e3f4bd 100644 (file)
@@ -351,7 +351,7 @@ static int check_sessiond(void)
                        pathname = opt_sessiond_path;
                } else {
                        /* Try LTTNG_SESSIOND_PATH env variable */
-                       pathname = getenv(LTTNG_SESSIOND_PATH_ENV);
+                       pathname = getenv(DEFAULT_SESSIOND_PATH_ENV);
                }
 
                /* Let's rock and roll */
@@ -387,9 +387,9 @@ static int check_args_no_sessiond(int argc, char **argv)
        int i;
 
        for (i = 0; i < argc; i++) {
-               if ((strncmp(argv[i], "-h", 2) == 0) ||
-                               strncmp(argv[i], "--h", 3) == 0 ||
-                               strncmp(argv[i], "--list-options", 14)) {
+               if ((strncmp(argv[i], "-h", sizeof("-h")) == 0) ||
+                               strncmp(argv[i], "--h", sizeof("--h")) == 0 ||
+                               strncmp(argv[i], "--list-options", sizeof("--list-options")) == 0) {
                        return 1;
                }
        }
@@ -494,8 +494,9 @@ int main(int argc, char *argv[])
        progname = argv[0] ? argv[0] : "lttng";
 
        /* For Mathieu Desnoyers aka Dr Tracing */
-       if (strncmp(progname, "drtrace", 7) == 0) {
-               MSG("%c[%d;%dmWelcome back Dr Tracing!%c[%dm\n\n", 27,1,33,27,0);
+       if (strncmp(progname, "drtrace", 7) == 0 ||
+                       strncmp("compudj", getenv("USER"), 7) == 0) {
+               MSG("%c[%d;%dmWelcome back Dr Tracing!%c[%dm\n", 27,1,33,27,0);
        }
 
        ret = set_signal_handler();
This page took 0.025493 seconds and 4 git commands to generate.