[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/e2fsprogs/e2fsprogs-1.42.9/tests/progs/crcsum.c b/ap/app/e2fsprogs/e2fsprogs-1.42.9/tests/progs/crcsum.c
new file mode 100644
index 0000000..9794e10
--- /dev/null
+++ b/ap/app/e2fsprogs/e2fsprogs-1.42.9/tests/progs/crcsum.c
@@ -0,0 +1,68 @@
+/*
+ * crcsum.c
+ *
+ * Copyright (C) 2013 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <fcntl.h>
+
+#include "et/com_err.h"
+#include "ss/ss.h"
+#include "ext2fs/ext2fs.h"
+
+
+int main(int argc, char **argv)
+{
+	int		c;
+	uint32_t	crc = ~0;
+	uint32_t	(*csum_func)(uint32_t crc, unsigned char const *p,
+				     size_t len);
+	FILE		*f;
+
+	csum_func = ext2fs_crc32c_le;
+
+	while ((c = getopt (argc, argv, "h")) != EOF) {
+		switch (c) {
+		case 'h':
+		default:
+			com_err(argv[0], 0, "Usage: crcsum [file]\n");
+			return 1;
+		}
+	}
+
+	if (optind == argc)
+		f = stdin;
+	else {
+		f = fopen(argv[optind], "r");
+		if (!f) {
+			com_err(argv[0], errno, "while trying to open %s\n",
+				argv[optind]);
+			exit(1);
+		}
+	}
+
+	while (!feof(f)) {
+		unsigned char buf[4096];
+
+		int c = fread(buf, 1, sizeof(buf), f);
+
+		if (c)
+			crc = csum_func(crc, buf, c);
+	}
+	printf("%u\n", crc);
+	return 0;
+}