File: patch

package info (click to toggle)
wiggle 1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,036 kB
  • sloc: ansic: 13,649; sh: 1,180; makefile: 194
file content (35 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git a/mdadm.c b/mdadm.c
index 11016e7..63962d1 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -116,6 +116,13 @@ int main(int argc, char *argv[])
 	ident.container = NULL;
 	ident.member = NULL;
 
+	/*
+	 * set first char of argv[0] to @. This is used by
+	 * systemd to signal that the task was launched from 
+	 * initrd/initramfs and should be preserved during shutdown
+	 */
+	argv[0][0] = '@';
+
 	while ((option_index = -1) ,
 	       (opt=getopt_long(argc, argv,
 				shortopt, long_options,
@@ -159,16 +166,6 @@ int main(int argc, char *argv[])
 				c.homehost = optarg;
 			continue;
 
-		/*
-		 * --offroot sets first char of argv[0] to @. This is used
-		 * by systemd to signal that the task was launched from
-		 * initrd/initramfs and should be preserved during shutdown
-		 */
-		case OffRootOpt:
-			argv[0][0] = '@';
-			__offroot = 1;
-			continue;
-
 		case Prefer:
 			if (c.prefer)
 				free(c.prefer);