[PATCH 70/74] Use power of 2 for STAR_COUNT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


   This patch looks good to me. acked.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJpOMMACgkQrlYvE4MpobPqywCguBV7E+qIhHvyLbLiPpTtJVoU
pJUAoMaeAE5Nkxd6ssecBsZ2yDDt2yqe
=LrkW
-----END PGP SIGNATURE-----
>From 0b3ef699843fffa599aeb887a840f5a063bb12ba Mon Sep 17 00:00:00 2001
From: Dan Walsh <dwalsh@xxxxxxxxxx>
Date: Fri, 11 Oct 2013 10:42:06 -0400
Subject: [PATCH 70/74] Use power of 2 for STAR_COUNT

---
 policycoreutils/setfiles/restore.c | 2 +-
 policycoreutils/setfiles/restore.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/policycoreutils/setfiles/restore.c b/policycoreutils/setfiles/restore.c
index a0e5415..7fe4166 100644
--- a/policycoreutils/setfiles/restore.c
+++ b/policycoreutils/setfiles/restore.c
@@ -118,7 +118,7 @@ static int restore(FTSENT *ftsent, int recurse)
 		r_opts->count++;
 		if (r_opts->count % STAR_COUNT == 0) {
 			if (r_opts->progress == 1) {
-				fprintf(stdout, "*");
+				fprintf(stdout, "\r%luk", (size_t) r_opts->count / STAR_COUNT );
 			} else {
 				if (r_opts->nfile > 0) {
 					progress = (r_opts->count < r_opts->nfile) ? (100.0 * r_opts->count / r_opts->nfile) : 100;
diff --git a/policycoreutils/setfiles/restore.h b/policycoreutils/setfiles/restore.h
index 57ae46a..406594b 100644
--- a/policycoreutils/setfiles/restore.h
+++ b/policycoreutils/setfiles/restore.h
@@ -16,7 +16,7 @@
 #include <limits.h>
 #include <stdint.h>
 
-#define STAR_COUNT 1000
+#define STAR_COUNT 1024
 
 /* Things that need to be init'd */
 struct restore_opts {
-- 
1.8.3.1


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux