chiark / gitweb /
cgtop: missing '-'
[elogind.git] / src / cgtop / cgtop.c
index a57a468b2cb194df0aba90a17575e07f6e886fde..9eb2d2fdebd108080ba9caaf2ecabb1acfed7880 100644 (file)
@@ -300,7 +300,7 @@ static int refresh_one(
 
         r = cg_enumerate_subgroups(controller, path, &d);
         if (r < 0) {
-                if (r == ENOENT)
+                if (r == -ENOENT)
                         return 0;
 
                 return r;
@@ -782,5 +782,10 @@ finish:
         group_hashmap_free(a);
         group_hashmap_free(b);
 
-        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+        if (r < 0) {
+                log_error("Exiting with failure: %s", strerror(-r));
+                return EXIT_FAILURE;
+        }
+
+        return EXIT_SUCCESS;
 }