Change not implemented error to undefined.
authorDavid Goulet <dgoulet@efficios.com>
Mon, 23 Jan 2012 21:55:40 +0000 (16:55 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 23 Jan 2012 21:55:40 +0000 (16:55 -0500)
Aiming to a stable release, "not implemented" message are not a good
idea for user to see.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 files changed:
src/bin/lttng-sessiond/channel.c
src/bin/lttng-sessiond/context.c
src/bin/lttng-sessiond/event.c
src/bin/lttng-sessiond/main.c
src/bin/lttng/command.h
src/bin/lttng/commands/add_context.c
src/bin/lttng/commands/calibrate.c
src/bin/lttng/commands/disable_channels.c
src/bin/lttng/commands/disable_events.c
src/bin/lttng/commands/enable_channels.c
src/bin/lttng/commands/enable_events.c
src/bin/lttng/lttng.c

index 23b3b1feea0050490e3a895d3054507e91a88536..54345d9c94bfa96a70ab9cd0ab6ffb925a9d4953 100644 (file)
@@ -194,7 +194,7 @@ int channel_ust_enable(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_EXEC_NAME:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -256,7 +256,7 @@ int channel_ust_create(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_EXEC_NAME:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error_free_chan;
        }
 
@@ -313,7 +313,7 @@ int channel_ust_disable(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_PID:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
index bbed1e767a8ecb1dbed73e4578bc4cfbab1f677e..0e7acefdb178e662e6588d2628be894830818301 100644 (file)
@@ -174,7 +174,7 @@ static int add_uctx_to_channel(struct ltt_ust_session *usess, int domain,
                }
                break;
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -213,7 +213,7 @@ static int add_uctx_to_event(struct ltt_ust_session *usess, int domain,
                }
                break;
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -298,7 +298,7 @@ int context_ust_add(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
index 0a82372bd57fdddf0d34061d56bc697c70a911c9..7cffe982096c8aee60cc3cb6f4274df88a5f4650 100644 (file)
@@ -340,7 +340,7 @@ int event_ust_enable_all_tracepoints(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -409,7 +409,7 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto end;
        }
 
@@ -478,7 +478,7 @@ int event_ust_disable_tracepoint(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -551,7 +551,7 @@ int event_ust_disable_all_tracepoints(struct ltt_ust_session *usess, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
index 1b837c1fc52ed201bcc2e553d2c67ce71189bddc..023ad48b991a75e983cf9d9148909d8b567e06b7 100644 (file)
@@ -2295,7 +2295,7 @@ static int cmd_disable_event(struct ltt_session *session, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -2364,7 +2364,7 @@ static int cmd_disable_event_all(struct ltt_session *session, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -2407,7 +2407,7 @@ static int cmd_add_context(struct ltt_session *session, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -2524,7 +2524,7 @@ static int cmd_enable_event(struct ltt_session *session, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -2661,7 +2661,7 @@ static int cmd_enable_event_all(struct ltt_session *session, int domain,
        case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
 #endif
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -2695,7 +2695,7 @@ static ssize_t cmd_list_tracepoints(int domain, struct lttng_event **events)
                }
                break;
        default:
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -2926,7 +2926,7 @@ static int cmd_calibrate(int domain, struct lttng_calibrate *calibrate)
        }
        default:
                /* TODO: Userspace tracing */
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -2962,7 +2962,7 @@ static int cmd_register_consumer(struct ltt_session *session, int domain,
                break;
        default:
                /* TODO: Userspace tracing */
-               ret = LTTCOMM_NOT_IMPLEMENTED;
+               ret = LTTCOMM_UND;
                goto error;
        }
 
@@ -3038,7 +3038,7 @@ static ssize_t cmd_list_channels(int domain, struct ltt_session *session,
                break;
        default:
                *channels = NULL;
-               ret = -LTTCOMM_NOT_IMPLEMENTED;
+               ret = -LTTCOMM_UND;
                goto error;
        }
 
@@ -3085,7 +3085,7 @@ static ssize_t cmd_list_events(int domain, struct ltt_session *session,
                break;
        }
        default:
-               ret = -LTTCOMM_NOT_IMPLEMENTED;
+               ret = -LTTCOMM_UND;
                goto error;
        }
 
index 887502bf012ad3699a1ac813789602dda7d494f4..09ce7c0ebbc5c034f5290f97040dc7a220f04319 100644 (file)
@@ -30,7 +30,6 @@ enum cmd_error_code {
        CMD_SUCCESS,
        CMD_ERROR,
        CMD_UNDEFINED,
-       CMD_NOT_IMPLEMENTED,
        CMD_FATAL,
 };
 
index 95fefa50c831486772eca28475a2612c0c10ed2d..260c300be8a5483f562902ea666ca3d22a82a34c 100644 (file)
@@ -368,7 +368,7 @@ static int add_context(char *session_name)
                dom.type = LTTNG_DOMAIN_UST;
        } else {
                ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
-               ret = CMD_NOT_IMPLEMENTED;
+               ret = CMD_UNDEFINED;
                goto error;
        }
 
index 023ea100e1fb6a8fcbdd4e712363421a050e72ae..485cae135413f43fa04c8611b88cc78c0581ba34 100644 (file)
@@ -154,11 +154,11 @@ static int calibrate_lttng(void)
                        DBG("Calibrating kernel syscall");
                        break;
                default:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        goto end;
                }
        } else if (opt_userspace) {             /* User-space tracer action */
-               ret = CMD_NOT_IMPLEMENTED;
+               ret = CMD_UNDEFINED;
                goto end;
        } else {
                ERR("Please specify a tracer (--kernel or --userspace)");
@@ -193,22 +193,22 @@ int cmd_calibrate(int argc, const char **argv)
                        ret = CMD_SUCCESS;
                        goto end;
                case OPT_TRACEPOINT:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_MARKER:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        goto end;
                case OPT_PROBE:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_FUNCTION:
                        opt_event_type = LTTNG_EVENT_FUNCTION;
                        break;
                case OPT_FUNCTION_ENTRY:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_SYSCALL:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_USERSPACE:
                        opt_userspace = 1;
index cc81b74c9e6ad70c603c9b363d11d17ea6ad9544..f8ed51759a35a1481e5e6e233e3c9ec7dfd13343 100644 (file)
@@ -96,7 +96,7 @@ static int disable_channels(char *session_name)
                dom.type = LTTNG_DOMAIN_UST;
        } else {
                ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
-               ret = CMD_NOT_IMPLEMENTED;
+               ret = CMD_UNDEFINED;
                goto error;
        }
 
index e6c8b2d06971a18b901f4eb7a4364ac194e0d22d..7446168d2a3d850bbf1f4a501ea605c4cffb9f01 100644 (file)
@@ -120,7 +120,7 @@ static int disable_events(char *session_name)
                dom.type = LTTNG_DOMAIN_UST;
        } else {
                ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
-               ret = CMD_NOT_IMPLEMENTED;
+               ret = CMD_UNDEFINED;
                goto error;
        }
 
@@ -152,7 +152,7 @@ static int disable_events(char *session_name)
 #if 0
                        if (opt_cmd_name != NULL || opt_pid) {
                                MSG("Only supporting tracing all UST processes (-u) for now.");
-                               ret = CMD_NOT_IMPLEMENTED;
+                               ret = CMD_UNDEFINED;
                                goto error;
                        }
 #endif
index 2da06ad503f0d954c90252e4ab4710e68302ad92..5443d78a3c8826138cf9e3813de8ea88936befa8 100644 (file)
@@ -159,7 +159,7 @@ static int enable_channel(char *session_name)
                dom.type = LTTNG_DOMAIN_UST;
        } else {
                ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
-               ret = CMD_NOT_IMPLEMENTED;
+               ret = CMD_UNDEFINED;
                goto error;
        }
 
index 8360821fb09221304b386f3dc45fac19a7107c59..c5a969f208e5fa66d11494a7aa49d41f4052fa5e 100644 (file)
@@ -232,7 +232,7 @@ static int enable_events(char *session_name)
                dom.type = LTTNG_DOMAIN_UST;
        } else {
                ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
-               ret = CMD_NOT_IMPLEMENTED;
+               ret = CMD_UNDEFINED;
                goto error;
        }
 
@@ -327,14 +327,14 @@ static int enable_events(char *session_name)
                                MSG("per-syscall selection not supported yet. Use \"-a\" "
                                                "for all syscalls.");
                        default:
-                               ret = CMD_NOT_IMPLEMENTED;
+                               ret = CMD_UNDEFINED;
                                goto error;
                        }
                } else if (opt_userspace) {             /* User-space tracer action */
 #if 0
                        if (opt_cmd_name != NULL || opt_pid) {
                                MSG("Only supporting tracing all UST processes (-u) for now.");
-                               ret = CMD_NOT_IMPLEMENTED;
+                               ret = CMD_UNDEFINED;
                                goto error;
                        }
 #endif
@@ -362,7 +362,7 @@ static int enable_events(char *session_name)
                        case LTTNG_EVENT_FUNCTION_ENTRY:
                        case LTTNG_EVENT_SYSCALL:
                        default:
-                               ret = CMD_NOT_IMPLEMENTED;
+                               ret = CMD_UNDEFINED;
                                goto error;
                        }
                } else {
index 7058dd529d1ecd73e3a191f84e08b0883b54628e..031b015efba4dd05da900b25a8d0c8ead4dfa7b7 100644 (file)
@@ -263,9 +263,6 @@ static int handle_command(int argc, char **argv)
                        case CMD_ERROR:
                                ERR("Command error");
                                break;
-                       case CMD_NOT_IMPLEMENTED:
-                               ERR("Options not implemented");
-                               break;
                        case CMD_UNDEFINED:
                                ERR("Undefined command");
                                break;
This page took 0.035192 seconds and 4 git commands to generate.