Rename BMGR DLT app ID to NSC, rename MGR context to CTRL
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Tue, 31 Jul 2012 17:36:44 +0000 (18:36 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Tue, 31 Jul 2012 17:44:23 +0000 (18:44 +0100)
legacy-app-handler/main.c
node-startup-controller/luc-starter.c
node-startup-controller/main.c
node-startup-controller/node-startup-controller-application.c
node-startup-controller/node-startup-controller-service.c
node-startup-controller/target-startup-monitor.c

index 7d45d06..fafd9db 100644 (file)
@@ -64,7 +64,7 @@ main (int    argc,
   gchar          *msg;
 
   /* register the application and context with the DLT */
-  DLT_REGISTER_APP ("BMGR", "GENIVI Boot Manager");
+  DLT_REGISTER_APP ("NSC", "GENIVI Node Startup Controller");
   DLT_REGISTER_CONTEXT (la_handler_context, "LAH", "Legacy Application Handler");
 
   /* make sure to unregister the DLT at exit */
index 6130be5..57121f8 100644 (file)
@@ -28,7 +28,7 @@
 
 
 
-DLT_IMPORT_CONTEXT (boot_manager_context);
+DLT_IMPORT_CONTEXT (controller_context);
 
 
 
@@ -191,7 +191,7 @@ luc_starter_constructed (GObject *object)
     {
       log_text = g_strdup_printf ("Failed to connect to the NSM lifecycle control: %s",
                                   error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
       g_error_free (error);
     }
@@ -404,7 +404,7 @@ luc_starter_start_app_finish (JobManager  *manager,
     {
       message = g_strdup_printf ("Failed to start the LUC application \"%s\": %s",
                                  unit, error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (message));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (message));
       g_free (message);
     }
 
@@ -491,11 +491,11 @@ luc_starter_check_luc_required_finish (GObject      *object,
     {
       log_text = g_strdup_printf ("Failed checking whether the LUC is required: %s",
                                   error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
       g_clear_error (&error);
 
-      DLT_LOG (boot_manager_context, DLT_LOG_INFO,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_STRING ("Assuming that we should start the LUC"));
 
       /* start all the LUC groups now */
@@ -506,7 +506,7 @@ luc_starter_check_luc_required_finish (GObject      *object,
       /* check whether we need to start the LUC or not */
       if (luc_required)
         {
-          DLT_LOG (boot_manager_context, DLT_LOG_INFO,
+          DLT_LOG (controller_context, DLT_LOG_INFO,
                    DLT_STRING ("LUC is required, starting it now"));
 
           /* start all the LUC groups now */
@@ -515,7 +515,7 @@ luc_starter_check_luc_required_finish (GObject      *object,
       else
         {
           /* LUC is not required, log this information */
-          DLT_LOG (boot_manager_context, DLT_LOG_INFO,
+          DLT_LOG (controller_context, DLT_LOG_INFO,
                    DLT_STRING ("LUC is not required"));
 
           /* notify others that we have started the LUC groups; we haven't
@@ -568,14 +568,14 @@ luc_starter_start_groups_for_real (LUCStarter *starter)
     {
       if (error->code == G_IO_ERROR_NOT_FOUND)
         {
-          DLT_LOG (boot_manager_context, DLT_LOG_INFO,
+          DLT_LOG (controller_context, DLT_LOG_INFO,
                    DLT_STRING ("Boot manager could not find the last user context"));
         }
       else
         {
           log_text = g_strdup_printf ("Error reading last user context: %s",
                                       error->message);
-          DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+          DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
           g_free (log_text);
         }
       g_error_free (error);
@@ -647,7 +647,7 @@ luc_starter_start_groups (LUCStarter *starter)
     }
   else
     {
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR,
+      DLT_LOG (controller_context, DLT_LOG_ERROR,
                DLT_STRING ("NSM unavailable, starting the LUC unconditionally"));
 
       /* start all the LUC groups now */
index d3785e2..5b27e46 100644 (file)
@@ -29,7 +29,7 @@
 
 
 
-DLT_DECLARE_CONTEXT (boot_manager_context);
+DLT_DECLARE_CONTEXT (controller_context);
 DLT_DECLARE_CONTEXT (la_handler_context);
 
 
@@ -37,7 +37,7 @@ DLT_DECLARE_CONTEXT (la_handler_context);
 static void
 unregister_dlt (void)
 {
-  DLT_UNREGISTER_CONTEXT (boot_manager_context);
+  DLT_UNREGISTER_CONTEXT (controller_context);
   DLT_UNREGISTER_CONTEXT (la_handler_context);
   DLT_UNREGISTER_APP ();
 }
@@ -60,11 +60,11 @@ main (int    argc,
   gchar                            *msg;
 
   /* register the application and context in DLT */
-  DLT_REGISTER_APP ("BMGR", "GENIVI Boot Manager");
-  DLT_REGISTER_CONTEXT (boot_manager_context, "MGR",
-                        "Context of the boot manager itself");
+  DLT_REGISTER_APP ("NSC", "GENIVI Node Startup Controller");
+  DLT_REGISTER_CONTEXT (controller_context, "CTRL",
+                        "Context of the Node Startup Controller itself");
   DLT_REGISTER_CONTEXT (la_handler_context, "LAH",
-                        "Context of the legacy application handler that hooks legacy "
+                        "Context of the Legacy Application Handler that hooks legacy "
                         "applications up with the shutdown concept of the Node State "
                         "Manager");
 
@@ -79,7 +79,7 @@ main (int    argc,
   if (connection == NULL)
     {
       msg = g_strdup_printf ("Failed to connect to the system bus: %s", error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_FATAL, DLT_STRING (msg));
+      DLT_LOG (controller_context, DLT_LOG_FATAL, DLT_STRING (msg));
       g_free (msg);
 
       /* clean up */
@@ -99,7 +99,7 @@ main (int    argc,
     {
       msg = g_strdup_printf ("Failed to connect to the systemd manager: %s",
                              error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_FATAL, DLT_STRING (msg));
+      DLT_LOG (controller_context, DLT_LOG_FATAL, DLT_STRING (msg));
       g_free (msg);
 
       /* clean up */
@@ -114,7 +114,7 @@ main (int    argc,
     {
       msg = g_strdup_printf ("Failed to subscribe to the systemd manager: %s",
                              error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_FATAL, DLT_STRING (msg));
+      DLT_LOG (controller_context, DLT_LOG_FATAL, DLT_STRING (msg));
       g_free (msg);
 
       /* clean up */
@@ -132,7 +132,7 @@ main (int    argc,
     {
       msg = g_strdup_printf ("Failed to start the node startup controller service: %s",
                              error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (msg));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (msg));
       g_free (msg);
 
       /* clean up */
@@ -155,7 +155,7 @@ main (int    argc,
     {
       msg = g_strdup_printf ("Failed to start the legacy app handler service: %s",
                              error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (msg));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (msg));
       g_free (msg);
 
       /* clean up */
index 2f3dbb2..e141599 100644 (file)
@@ -34,7 +34,7 @@
 
 
 
-DLT_IMPORT_CONTEXT (boot_manager_context);
+DLT_IMPORT_CONTEXT (controller_context);
 
 
 
@@ -225,7 +225,7 @@ node_startup_controller_application_init (NodeStartupControllerApplication *appl
       /* log information about the watchdog timeout using DLT */
       message = g_strdup_printf ("Updating systemd's watchdog timestamp every %d seconds",
                                  watchdog_sec);
-      DLT_LOG (boot_manager_context, DLT_LOG_INFO, DLT_STRING (message));
+      DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING (message));
       g_free (message);
     }
 }
@@ -328,7 +328,7 @@ node_startup_controller_application_constructed (GObject *object)
     {
       log_text = g_strdup_printf ("Failed to export shutdown consumer on the bus: %s",
                                   error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
       g_clear_error (&error);
     }
@@ -365,7 +365,7 @@ node_startup_controller_application_handle_register_finish (GObject      *object
     {
       log_text = g_strdup_printf ("Failed to register the node startup controller as a shutdown "
                                   "consumer: %s", error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
       g_error_free (error);
     }
@@ -373,14 +373,14 @@ node_startup_controller_application_handle_register_finish (GObject      *object
     {
       log_text = g_strdup_printf ("The node startup controller has registered as a shutdown "
                                   "consumer");
-      DLT_LOG (boot_manager_context, DLT_LOG_INFO, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING (log_text));
       g_free (log_text);
     }
   else
     {
       log_text = g_strdup_printf ("Failed to register the node startup controller as a shutdown "
                                   "consumer: error status %d", error_code);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
     }
 }
@@ -408,7 +408,7 @@ node_startup_controller_application_handle_unregister_finish (GObject      *obje
     {
       log_text = g_strdup_printf ("Failed to unregister the node startup controller as a shutdown "
                                   "consumer: %s", error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
       g_error_free (error);
     }
@@ -416,14 +416,14 @@ node_startup_controller_application_handle_unregister_finish (GObject      *obje
     {
       log_text = g_strdup_printf ("The node startup controller has unregistered as a shutdown "
                                   "consumer");
-      DLT_LOG (boot_manager_context, DLT_LOG_INFO, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING (log_text));
       g_free (log_text);
     }
   else
     {
       log_text = g_strdup_printf ("Failed to unregister the node startup controller as a shutdown "
                                   "consumer: error status %d", error_code);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
     }
 
index 5e7d1d6..d984dce 100644 (file)
@@ -23,7 +23,7 @@
 
 
 
-DLT_IMPORT_CONTEXT (boot_manager_context);
+DLT_IMPORT_CONTEXT (controller_context);
 
 
 
@@ -241,7 +241,7 @@ node_startup_controller_service_handle_finish_luc_registration (NodeStartupContr
     {
       log_text = g_strdup_printf ("Failed to finish LUC registration: "
                                   "the registration sequence has not been started yet");
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
 
       /* notify the caller that we have handled the method call */
@@ -254,7 +254,7 @@ node_startup_controller_service_handle_finish_luc_registration (NodeStartupContr
   if (error != NULL)
    {
      log_text = g_strdup_printf ("Failed to finish LUC registration: %s", error->message);
-     DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+     DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
      g_free (log_text);
      g_error_free (error);
    }
@@ -305,7 +305,7 @@ node_startup_controller_service_handle_register_with_luc (NodeStartupController
     {
       log_text = g_strdup_printf ("Failed to register apps with the LUC: "
                                   "The registration sequence has not been started yet");
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
 
       /* notify the caller that we have handled the register request */
@@ -412,7 +412,7 @@ node_startup_controller_service_handle_register_with_luc (NodeStartupController
   /* log the new last user context */
   debug_text = g_variant_print (service->current_user_context, TRUE);
   log_text = g_strdup_printf ("The new context is: %s", debug_text);
-  DLT_LOG (boot_manager_context, DLT_LOG_DEBUG, DLT_STRING (log_text));
+  DLT_LOG (controller_context, DLT_LOG_DEBUG, DLT_STRING (log_text));
   g_free (debug_text);
   g_free (log_text);
 
index dd8a130..555a0d1 100644 (file)
@@ -24,7 +24,7 @@
 
 
 
-DLT_IMPORT_CONTEXT (boot_manager_context);
+DLT_IMPORT_CONTEXT (controller_context);
 
 
 
@@ -145,7 +145,7 @@ target_startup_monitor_init (TargetStartupMonitor *monitor)
     {
      log_text = g_strdup_printf ("Failed to connect to the NSM lifecycle control: %s",
                                   error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
       g_error_free (error);
     }
@@ -303,7 +303,7 @@ target_startup_monitor_get_unit_finish (GObject      *object,
       /* there was an error, log it */
       message = g_strdup_printf ("Failed to get unit \"%s\" from systemd: %s",
                                  data->unit_name, error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (message));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (message));
       g_free (message);
       g_error_free (error);
 
@@ -315,7 +315,7 @@ target_startup_monitor_get_unit_finish (GObject      *object,
   else
     {
       message = g_strdup_printf ("Creating D-Bus proxy for unit \"%s\"", object_path);
-      DLT_LOG (boot_manager_context, DLT_LOG_INFO, DLT_STRING (message));
+      DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING (message));
       g_free (message);
 
       /* remember the object path */
@@ -356,7 +356,7 @@ target_startup_monitor_unit_proxy_new_finish (GObject      *object,
       /* there was an error, log it */
       message = g_strdup_printf ("Failed to create a D-Bus proxy for unit \"%s\": %s",
                                  data->object_path, error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (message));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (message));
       g_error_free (error);
     }
   else
@@ -367,7 +367,7 @@ target_startup_monitor_unit_proxy_new_finish (GObject      *object,
       /* log the the active state has changed */
       message = g_strdup_printf ("Active state of unit \"%s\" changed to %s",
                                  data->unit_name, state);
-      DLT_LOG (boot_manager_context, DLT_LOG_INFO, DLT_STRING (message));
+      DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING (message));
       g_free (message);
 
       /* check if the new state is active */
@@ -430,7 +430,7 @@ target_startup_monitor_set_node_state_finish (GObject      *object,
                                                          &error))
     {
       log_text = g_strdup_printf ("Failed to set the node state: %s", error->message);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
       g_error_free (error);
     }
@@ -438,7 +438,7 @@ target_startup_monitor_set_node_state_finish (GObject      *object,
     {
       log_text = g_strdup_printf ("Failed to set the node state: error code %d",
                                   error_code);
-      DLT_LOG (boot_manager_context, DLT_LOG_ERROR, DLT_STRING (log_text));
+      DLT_LOG (controller_context, DLT_LOG_ERROR, DLT_STRING (log_text));
       g_free (log_text);
     }
 }