[PATCH] xfs_io: allow -F in open args

Eric Sandeen sandeen at redhat.com
Thu Mar 8 16:20:44 CST 2012


Now that -F ("foreign") is automagic, we should no longer list
it in the help output for open, but we should still accept
it for compatibility; esp. as it is still in the case statement.
Oops.

Reported-by: Mark Tinguely <tinguely at sgi.com>
Signed-off-by: Eric Sandeen <sandeen at redhat.com>
---

diff --git a/io/open.c b/io/open.c
index ac39ccc..46538ba 100644
--- a/io/open.c
+++ b/io/open.c
@@ -240,7 +240,6 @@ open_help(void)
 "\n"
 " Opens a file for subsequent use by all of the other xfs_io commands.\n"
 " With no arguments, open uses the stat command to show the current file.\n"
-" -F -- foreign filesystem file, disallow XFS-specific commands\n"
 " -a -- open with the O_APPEND flag (append-only mode)\n"
 " -d -- open with O_DIRECT (non-buffered IO, note alignment constraints)\n"
 " -f -- open with O_CREAT (create the file if it doesn't exist)\n"
@@ -274,7 +273,7 @@ open_f(
 		return 0;
 	}
 
-	while ((c = getopt(argc, argv, "Racdfm:nrstx")) != EOF) {
+	while ((c = getopt(argc, argv, "FRacdfm:nrstx")) != EOF) {
 		switch (c) {
 		case 'F':
 			/* Ignored / deprecated now, handled automatically */




More information about the xfs mailing list