]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
solv: Do not print duchanges if there is no change
authorMichael Schroeder <mls@suse.de>
Tue, 13 Dec 2022 10:22:29 +0000 (11:22 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 13 Dec 2022 10:22:29 +0000 (11:22 +0100)
examples/solv/solv.c

index f148daf2cdfd1a9fa35f8fc523c9ce0adbfffcdf..36a1ac097c8dcc8193d0927f967239b72402b75b 100644 (file)
@@ -130,7 +130,8 @@ showdiskusagechanges(Transaction *trans)
   duc[3].path = "/etc";
   transaction_calc_duchanges(trans, duc, 4);
   for (i = 0; i < 4; i++)
-    printf("duchanges %s: %lld K  %lld inodes\n", duc[i].path, duc[i].kbytes, duc[i].files);
+    if (duc[i].kbytes || duc[i].files)
+      printf("duchanges %s: %lld K  %lld inodes\n", duc[i].path, duc[i].kbytes, duc[i].files);
 }
 #endif