OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 | 6 |
7 #include <gflags/gflags.h> | 7 #include <gflags/gflags.h> |
8 #include <glib.h> | 8 #include <glib.h> |
9 | 9 |
10 #include "update_engine/marshal.glibmarshal.h" | 10 #include "update_engine/marshal.glibmarshal.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error); | 42 bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error); |
43 if (!bus) { | 43 if (!bus) { |
44 LOG(FATAL) << "Failed to get bus"; | 44 LOG(FATAL) << "Failed to get bus"; |
45 } | 45 } |
46 proxy = dbus_g_proxy_new_for_name_owner(bus, | 46 proxy = dbus_g_proxy_new_for_name_owner(bus, |
47 kUpdateEngineServiceName, | 47 kUpdateEngineServiceName, |
48 kUpdateEngineServicePath, | 48 kUpdateEngineServicePath, |
49 kUpdateEngineServiceInterface, | 49 kUpdateEngineServiceInterface, |
50 &error); | 50 &error); |
51 if (!proxy) { | 51 if (!proxy) { |
52 LOG(FATAL) << "Error getting proxy: " << GetGErrorMessage(error); | 52 LOG(FATAL) << "Error getting dbus proxy for " |
| 53 << kUpdateEngineServiceName << ": " << GetGErrorMessage(error); |
53 } | 54 } |
54 *out_proxy = proxy; | 55 *out_proxy = proxy; |
55 return true; | 56 return true; |
56 } | 57 } |
57 | 58 |
58 static void StatusUpdateSignalHandler(DBusGProxy* proxy, | 59 static void StatusUpdateSignalHandler(DBusGProxy* proxy, |
59 int64_t last_checked_time, | 60 int64_t last_checked_time, |
60 double progress, | 61 double progress, |
61 gchar* current_operation, | 62 gchar* current_operation, |
62 gchar* new_version, | 63 gchar* new_version, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 252 |
252 if (FLAGS_reboot) { | 253 if (FLAGS_reboot) { |
253 LOG(INFO) << "Requesting a reboot..."; | 254 LOG(INFO) << "Requesting a reboot..."; |
254 CHECK(RebootIfNeeded()); | 255 CHECK(RebootIfNeeded()); |
255 return 0; | 256 return 0; |
256 } | 257 } |
257 | 258 |
258 LOG(INFO) << "No flags specified. Exiting."; | 259 LOG(INFO) << "No flags specified. Exiting."; |
259 return 0; | 260 return 0; |
260 } | 261 } |
OLD | NEW |