summaryrefslogtreecommitdiff
blob: e0e9854ca1722faee00dbb2cb542a108a7846bd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- 1/mksquashfs.c
+++ 1/mksquashfs.c
@@ -78,6 +78,7 @@
 #include "process_fragments.h"
 
 int delete = FALSE;
+int quiet = FALSE;
 int fd;
 struct squashfs_super_block sBlk;
 
@@ -4169,7 +4170,7 @@
 
 	main_thread = pthread_self();
 
-	printf("Parallel mksquashfs: Using %d processor%s\n", processors,
+	quiet || printf("Parallel mksquashfs: Using %d processor%s\n", processors,
 			processors == 1 ? "" : "s");
 
 	/* Restore the signal mask for the main thread */
@@ -4687,6 +4688,9 @@
 	total_bytes += total_inode_bytes + total_directory_bytes +
 		sizeof(struct squashfs_super_block) + total_xattr_bytes;
 
+	if(quiet)
+		return;
+
 	printf("\n%sSquashfs %d.%d filesystem, %s compressed, data block size"
 		" %d\n", exportable ? "Exportable " : "", SQUASHFS_MAJOR,
 		SQUASHFS_MINOR, comp->name, block_size);
@@ -5259,6 +5263,9 @@
 		else if(strcmp(argv[i], "-noappend") == 0)
 			delete = TRUE;
 
+		else if(strcmp(argv[i], "-quiet") == 0)
+			quiet = TRUE;
+
 		else if(strcmp(argv[i], "-keep-as-directory") == 0)
 			keep_as_directory = TRUE;
 
@@ -5351,6 +5358,7 @@
 				"using recovery file <name>\n");
 			ERROR("-no-recovery\t\tdon't generate a recovery "
 				"file\n");
+			ERROR("-quiet\t\t\tno verbose output\n");
 			ERROR("-info\t\t\tprint files written to filesystem\n");
 			ERROR("-no-progress\t\tdon't display the progress "
 				"bar\n");
@@ -5541,7 +5549,7 @@
 		void *comp_data = compressor_dump_options(comp, block_size,
 			&size);
 
-		printf("Creating %d.%d filesystem on %s, block size %d.\n",
+		quiet || printf("Creating %d.%d filesystem on %s, block size %d.\n",
 			SQUASHFS_MAJOR, SQUASHFS_MINOR, argv[source + 1], block_size);
 
 		/*