Browse Source

mount_root: fix compilation error for wrong condition

While reworking this to new implementation, a broken and old commit
slipped in by mistake.

Fix compilation error for wrong condition.

mount_root.c: In function 'main':
mount_root.c:131:23: error: expected expression before '||' token
  131 |         if (argc < 2) || (!strcmp(argv[1], "start"))
      |                       ^~
mount_root.c: At top level:
mount_root.c:31:1: error: 'start' defined but not used [-Werror=unused-function]
   31 | start(int argc, char *argv[3])
      | ^~~~~
cc1: all warnings being treated as errors

Fixes: 1a5695925ecf ("mount_root: add support for passing args to mount_root start")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Christian Marangi 3 months ago
parent
commit
325d63d670
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mount_root.c

+ 1 - 1
mount_root.c

@@ -128,7 +128,7 @@ done(int argc, char *argv[1])
 
 int main(int argc, char **argv)
 {
-	if (argc < 2) || (!strcmp(argv[1], "start"))
+	if (argc < 2 || !strcmp(argv[1], "start"))
 		return start(argc, argv);
 	if (!strcmp(argv[1], "ram"))
 		return ramoverlay();