* setfiles will only put out a "*" if > 1000 files are fixed.
@ 2009-05-20 17:08 Daniel J Walsh
2009-06-23 17:07 ` Joshua Brindle
0 siblings, 1 reply; 2+ messages in thread
From: Daniel J Walsh @ 2009-05-20 17:08 UTC (permalink / raw)
To: SE Linux
[-- Attachment #1: Type: text/plain, Size: 129 bytes --]
setfiles was always putting out a \n, even when not many files were
being fixed. yum transactions were being desturbed by this.
[-- Attachment #2: policycoreutils-setfiles.patch --]
[-- Type: text/plain, Size: 815 bytes --]
--- nsapolicycoreutils/setfiles/setfiles.c 2008-08-28 09:34:24.000000000 -0400
+++ policycoreutils-2.0.62/setfiles/setfiles.c 2009-05-14 11:05:15.000000000 -0400
@@ -29,6 +29,8 @@
static int mass_relabel;
static int mass_relabel_errs;
+#define STAR_COUNT 1000
+
static FILE *outfile = NULL;
static int force = 0;
#define STAT_BLOCK_SIZE 1
@@ -444,11 +446,11 @@
if (progress) {
count++;
- if (count % 80000 == 0) {
+ if (count % (80 * STAR_COUNT) == 0) {
fprintf(stdout, "\n");
fflush(stdout);
}
- if (count % 1000 == 0) {
+ if (count % STAR_COUNT == 0) {
fprintf(stdout, "*");
fflush(stdout);
}
@@ -1017,7 +1019,7 @@
free(excludeArray[i].directory);
}
- if (progress)
+ if (progress && count >= STAR_COUNT)
printf("\n");
exit(errors);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-23 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 17:08 setfiles will only put out a "*" if > 1000 files are fixed Daniel J Walsh
2009-06-23 17:07 ` Joshua Brindle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.