Skip to contentSkip to conversation

Make fsck.reiser4 really quiet

PATCH New Joe Feise 1 participant 1 message Dec 4, 2006

lore
Share & tools
lore

Joe Feise

author
#0 lore raw

PATCH 1/1 Make fsck.reiser4 really quiet

Hi,

Attached is a patch to make the -q switch to fsck.reiser4 *really* quiet. It also removes the shouting style of all-caps text for the major fsck actions. Diff'ed against reiser4progs 1.0.6.

Cheers,
-Joe

include/repair/repair.h +1 -0
diff -urN reiser4progs-1.0.6.orig/include/repair/repair.h reiser4progs-1.0.6/include/repair/repair.h
@@ -29,6 +29,7 @@
 	char *bitmap_file;
 	
 	uint32_t flags;
+	uint8_t quiet;
 } repair_data_t;
 
 extern errno_t repair_check(repair_data_t *repair);
librepair/add_missing.c +3 -2
diff -urN reiser4progs-1.0.6.orig/librepair/add_missing.c reiser4progs-1.0.6/librepair/add_missing.c
@@ -297,7 +297,7 @@
 	aal_assert("vpf-848", am->bm_twig != NULL);
 	aal_assert("vpf-849", am->bm_leaf != NULL);
 	
-	aal_mess("INSERTING UNCONNECTED NODES");
+	aal_mess("Inserting unconnected nodes");
 	am->gauge = aal_gauge_create(aux_gauge_handlers[GT_PROGRESS], 
 				     NULL, NULL, 500, NULL);
 	time(&am->stat.time);
@@ -358,7 +358,8 @@
 	}
 	
 	aal_gauge_free(am->gauge);
-	repair_add_missing_update(am);
+	if (!am->repair->quiet)
+		repair_add_missing_update(am);
 	reiser4_fs_sync(am->repair->fs);
 	
 	return 0;
librepair/cleanup.c +3 -2
diff -urN reiser4progs-1.0.6.orig/librepair/cleanup.c reiser4progs-1.0.6/librepair/cleanup.c
@@ -143,7 +143,7 @@
 		return 0;
 	}
 	
-	aal_mess("CLEANING UP THE STORAGE TREE");
+	aal_mess("Cleaning up the storage tree");
 	cleanup->gauge = aal_gauge_create(aux_gauge_handlers[GT_PROGRESS],
 					  cb_gauge_tree_percent, NULL, 500, NULL);
 	aal_gauge_set_value(cleanup->gauge, 0);
@@ -158,7 +158,8 @@
 
 	aal_gauge_done(cleanup->gauge);
 	aal_gauge_free(cleanup->gauge);
-	repair_cleanup_update(cleanup);
+	if (!cleanup->repair->quiet)
+		repair_cleanup_update(cleanup);
 	reiser4_fs_sync(cleanup->repair->fs);
 	
 	return 0;
librepair/disk_scan.c +3 -2
diff -urN reiser4progs-1.0.6.orig/librepair/disk_scan.c reiser4progs-1.0.6/librepair/disk_scan.c
@@ -79,7 +79,7 @@
 	aal_assert("vpf-820", ds->bm_scan != NULL);
 	aal_assert("vpf-820", ds->bm_met != NULL);    
 	
-	aal_mess("LOOKING FOR UNCONNECTED NODES");
+	aal_mess("Looking for unconnected nodes");
 	gauge = aal_gauge_create(aux_gauge_handlers[GT_PROGRESS], 
 				 NULL, NULL, 500, NULL);
 	aal_gauge_touch(gauge);
@@ -161,6 +161,7 @@
  error:
 	aal_gauge_done(gauge);
 	aal_gauge_free(gauge);
-	repair_disk_scan_update(ds);
+	if (!ds->repair->quiet)
+		repair_disk_scan_update(ds);
 	return res;
 }
librepair/filter.c +3 -2
diff -urN reiser4progs-1.0.6.orig/librepair/filter.c reiser4progs-1.0.6/librepair/filter.c
@@ -659,7 +659,7 @@
 	aal_assert("vpf-816", fd->repair->fs->tree != NULL);
 	aal_assert("vpf-815", fd->bm_used != NULL);
 
-	aal_mess("CHECKING THE STORAGE TREE");
+	aal_mess("Checking the storage tree");
 	fd->gauge = aal_gauge_create(aux_gauge_handlers[GT_PROGRESS], 
 				     cb_gauge_tree_percent, NULL, 500, NULL);
 	time(&fd->stat.time);
@@ -667,7 +667,8 @@
 	res = repair_filter_traverse(fd);
 	
 	aal_gauge_free(fd->gauge);
-	repair_filter_update(fd);
+	if (!fd->repair->quiet)
+		repair_filter_update(fd);
 	
 	if (!res && fd->repair->mode != RM_CHECK)
 		reiser4_fs_sync(fd->repair->fs);
librepair/repair.c +1 -1
diff -urN reiser4progs-1.0.6.orig/librepair/repair.c reiser4progs-1.0.6/librepair/repair.c
@@ -747,7 +747,7 @@
 	/* Scan the storage reiser4 tree. Cut broken parts out. */
 	if ((res = repair_filter_prepare(&control, &filter)))
 		goto error;
-	
+
 	if ((res = repair_filter(&filter)))
 		goto error;
 	
librepair/semantic.c +3 -2
diff -urN reiser4progs-1.0.6.orig/librepair/semantic.c reiser4progs-1.0.6/librepair/semantic.c
@@ -816,7 +816,7 @@
 	if ((res = reiser4_tree_load_root(tree)))
 		goto error;
 
-	aal_mess("CHECKING THE SEMANTIC TREE");
+	aal_mess("Checking the semantic tree");
 	sem->gauge = aal_gauge_create(aux_gauge_handlers[GT_PROGRESS], 
 				      NULL, NULL, 500, NULL);
 	aal_gauge_set_value(sem->gauge, 0);
@@ -870,7 +870,8 @@
  error_update:
 	aal_gauge_done(sem->gauge);
 	aal_gauge_free(sem->gauge);
-	repair_semantic_update(sem);	
+	if (!sem->repair->quiet)
+		repair_semantic_update(sem);	
 	
  error:
 	if ((res >= 0) && sem->repair->mode != RM_CHECK)
librepair/twig_scan.c +3 -2
diff -urN reiser4progs-1.0.6.orig/librepair/twig_scan.c reiser4progs-1.0.6/librepair/twig_scan.c
@@ -136,7 +136,7 @@
 	aal_assert("vpf-534", ts->repair != NULL);
 	aal_assert("vpf-845", ts->repair->fs != NULL);
 	
-	aal_mess("CHECKING EXTENT REGIONS.");
+	aal_mess("Checking extent regions");
 	gauge = aal_gauge_create(aux_gauge_handlers[GT_PROGRESS], 
 				 NULL, NULL, 500, NULL);
 	aal_gauge_touch(gauge);
@@ -175,7 +175,8 @@
 	aal_gauge_done(gauge);
 	aal_gauge_free(gauge);
 	
-	repair_twig_scan_update(ts);
+	if (!ts->repair->quiet)
+		repair_twig_scan_update(ts);
 
 	if (ts->repair->mode != RM_CHECK)
 		reiser4_fs_sync(ts->repair->fs);
progs/fsck/fsck.c +57 -54

163 lines not on this page · raw message