[PATCH 3/4] Add --initrd argument to mdmon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
---
 mdmon.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/mdmon.c b/mdmon.c
index a65c4a4..139bd85 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -276,6 +276,12 @@ void usage(void)
 	exit(2);
 }
 
+/*
+ * Option values that don't have a short version, to avoid clashing\
+ * with ascii values
+ */
+#define INITRD_OPT	0x100
+
 static int mdmon(char *devname, int devnum, int must_fork, int takeover);
 
 int main(int argc, char *argv[])
@@ -283,6 +289,7 @@ int main(int argc, char *argv[])
 	char *container_name = NULL;
 	int devnum;
 	char *devname;
+	char *c;
 	int status = 0;
 	int opt;
 	int all = 0;
@@ -291,6 +298,7 @@ int main(int argc, char *argv[])
 		{"all", 0, NULL, 'a'},
 		{"takeover", 0, NULL, 't'},
 		{"help", 0, NULL, 'h'},
+		{"initrd", 0, NULL, INITRD_OPT},
 		{NULL, 0, NULL, 0}
 	};
 
@@ -304,6 +312,11 @@ int main(int argc, char *argv[])
 			container_name = optarg;
 			takeover = 1;
 			break;
+		case INITRD_OPT:
+			c = argv[0];
+			c[0] = '@';
+			continue;
+			
 		case 'h':
 		default:
 			usage();
-- 
1.7.8.3

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux