mksquashfs: enable -quiet option

It is nice if the user interface of wrapper scripts can display a
progress bar to the user without having to display the detailed
information about the generated file. This can be achieved easily
by the new -quiet option. This is optionally already used by e.g.
https://github.com/vaeth/squashmount/
diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
index b7643c4..1ccbb28 100644
--- a/squashfs-tools/mksquashfs.c
+++ b/squashfs-tools/mksquashfs.c
@@ -78,6 +78,7 @@
 #include "fnmatch_compat.h"
 
 int delete = FALSE;
+int quiet = FALSE;
 int fd;
 struct squashfs_super_block sBlk;
 
@@ -4277,7 +4278,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 */
@@ -4804,6 +4805,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);
@@ -5540,6 +5544,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;
 
@@ -5632,6 +5639,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");
@@ -5824,7 +5832,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);
 
 		/*