1 diff --git a/tools/ck-seat-tool.c.old b/tools/ck-seat-tool.c
2 index 773afb7..8a0bdd5 100644
3 --- a/tools/ck-seat-tool.c.old
4 +++ b/tools/ck-seat-tool.c
5 @@ -66,7 +66,7 @@ static const GOptionEntry options [] = {
11 add_session (DBusGConnection *connection)
13 DBusGProxy *mgr_proxy = NULL;
14 @@ -92,7 +92,7 @@ add_session (DBusGConnection *connection)
16 CK_MANAGER_INTERFACE);
17 if (mgr_proxy == NULL) {
22 if (! IS_STR_SET(seat_id)) {
23 @@ -110,7 +110,7 @@ add_session (DBusGConnection *connection)
24 g_warning ("Unable to add seat: %s", error->message);
26 g_object_unref (mgr_proxy);
32 @@ -133,7 +133,7 @@ add_session (DBusGConnection *connection)
33 g_warning ("Unable to get seat list: %s", error->message);
35 g_object_unref (mgr_proxy);
41 @@ -163,7 +163,7 @@ add_session (DBusGConnection *connection)
42 g_warning ("Unable to add seat: %s", error->message);
44 g_object_unref (mgr_proxy);
50 @@ -176,7 +176,7 @@ add_session (DBusGConnection *connection)
51 if (seat_proxy == NULL) {
52 g_warning ("Failed to talk to seat '%s'", sid);
53 g_object_unref (mgr_proxy);
58 variables = g_hash_table_new_full (g_str_hash, g_str_equal,
59 @@ -218,11 +218,15 @@ add_session (DBusGConnection *connection)
63 - g_print ("Seat %s with session %s has been added\n", sid, ssid);
64 + /* If a session is successfully added, print sessionid to stdout.
65 + dsession uses the output of "ck-seat-tool -a" to obtain session ID */
66 + g_print ("%s\n", g_basename (ssid));
69 g_object_unref (seat_proxy);
70 g_object_unref (mgr_proxy);
76 @@ -329,7 +332,7 @@ find_seat_id_from_session_id (DBusGConnection *connection,
82 delete_session (DBusGConnection *connection)
85 @@ -348,7 +351,7 @@ delete_session (DBusGConnection *connection)
87 CK_MANAGER_INTERFACE);
93 sid = find_seat_id_from_session_id (connection, proxy, ssid, &is_last_session);
94 @@ -374,6 +377,8 @@ delete_session (DBusGConnection *connection)
97 g_object_unref (proxy);
103 @@ -437,9 +442,15 @@ main (int argc, char *argv[])
107 - add_session (connection);
108 + if (add_session (connection))
113 - delete_session (connection);
114 + if (delete_session (connection))
119 g_warning ("Invaild parameters!");