All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <519EF740.1000907@redhat.com>

diff --git a/a/1.txt b/N1/1.txt
index 9cd76a6..41acd82 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -45,3 +45,31 @@ index 4275a84..f957178 100644
 -		fprintf(stdout, "Usage: %s base_file_path\n", argv[0]);
 -		return ret;
 -	}
+-
+ 	while ((opt = getopt(argc, argv, "t")) != -1) {
+ 		switch (opt) {
+ 		case 't':
+ 			check_support++;
+ 			break;
+ 		default:
+-			fprintf(stderr, "Usage: %s [-t] base_file_path\n",
+-				argv[0]);
+-			return ret;
++			usage(argv[0]);
+ 		}
+ 	}
+ 
++	/* should be exactly one arg left, the filename */
++	if (optind != argc - 1)
++		usage(argv[0]);
++
+ 	base_file_path = (char *)strdup(argv[optind]);
+ 
+ 	ret = test_basic_support();
+
+
+
+_______________________________________________
+xfs mailing list
+xfs@oss.sgi.com
+http://oss.sgi.com/mailman/listinfo/xfs
diff --git a/a/content_digest b/N1/content_digest
index f0d6d4b..7f74bb2 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -52,6 +52,34 @@
  "-\tif (argc != 2) {\n"
  "-\t\tfprintf(stdout, \"Usage: %s base_file_path\\n\", argv[0]);\n"
  "-\t\treturn ret;\n"
- "-\t}"
+ "-\t}\n"
+ "-\n"
+ " \twhile ((opt = getopt(argc, argv, \"t\")) != -1) {\n"
+ " \t\tswitch (opt) {\n"
+ " \t\tcase 't':\n"
+ " \t\t\tcheck_support++;\n"
+ " \t\t\tbreak;\n"
+ " \t\tdefault:\n"
+ "-\t\t\tfprintf(stderr, \"Usage: %s [-t] base_file_path\\n\",\n"
+ "-\t\t\t\targv[0]);\n"
+ "-\t\t\treturn ret;\n"
+ "+\t\t\tusage(argv[0]);\n"
+ " \t\t}\n"
+ " \t}\n"
+ " \n"
+ "+\t/* should be exactly one arg left, the filename */\n"
+ "+\tif (optind != argc - 1)\n"
+ "+\t\tusage(argv[0]);\n"
+ "+\n"
+ " \tbase_file_path = (char *)strdup(argv[optind]);\n"
+ " \n"
+ " \tret = test_basic_support();\n"
+ "\n"
+ "\n"
+ "\n"
+ "_______________________________________________\n"
+ "xfs mailing list\n"
+ "xfs@oss.sgi.com\n"
+ http://oss.sgi.com/mailman/listinfo/xfs
 
-57edc26693e3e9d60e27bf122185eb428ebbbe10306ff47ced3b1ab0b0d48a67
+812e65054b36521731d1d33a110dc5eb68c326d481a681b27ddac04511b9a4df

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.