Bump libglnx, use "n items" progress for fsck
authorColin Walters <walters@verbum.org>
Fri, 15 Dec 2017 02:42:54 +0000 (21:42 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 15 Dec 2017 15:50:34 +0000 (15:50 +0000)
Sooo much nicer.  See also
https://github.com/projectatomic/rpm-ostree/pull/1143

Update submodule: libglnx

Closes: #1383
Approved by: jlebon

libglnx
src/ostree/ot-builtin-fsck.c

diff --git a/libglnx b/libglnx
index b36606b366d39c7ddb90ee21d622c0cb1da118ed..96b1fd9578b3d6ff2d8e0707068f5ef450eba98c 160000 (submodule)
--- a/libglnx
+++ b/libglnx
@@ -1 +1 @@
-Subproject commit b36606b366d39c7ddb90ee21d622c0cb1da118ed
+Subproject commit 96b1fd9578b3d6ff2d8e0707068f5ef450eba98c
index 79fd9e21ad91706071877715f9d8d6cd130b0d24..70a3021008e8e5c44eacda7a23335edcc4f18d55 100644 (file)
@@ -111,8 +111,10 @@ fsck_reachable_objects_from_commits (OstreeRepo            *repo,
         return FALSE;
     }
 
+  g_auto(GLnxConsoleRef) console = { 0, };
+  glnx_console_lock (&console);
+
   const guint count = g_hash_table_size (reachable_objects);
-  const guint mod = count / 10;
   guint i = 0;
   g_hash_table_iter_init (&hash_iter, reachable_objects);
   while (g_hash_table_iter_next (&hash_iter, &key, &value))
@@ -127,9 +129,8 @@ fsck_reachable_objects_from_commits (OstreeRepo            *repo,
                             cancellable, error))
         return FALSE;
 
-      if (mod == 0 || (i % mod == 0))
-        g_print ("%u/%u objects\n", i + 1, count);
       i++;
+      glnx_console_progress_n_items ("fsck objects", i, count);
     }
 
   return TRUE;