[v3,2/3] weston-init: Fix weston-start to handle 0 or 1 args

Submitted by Tom Hochstein on July 18, 2016, 4:46 p.m. | Patch ID: 127453

Details

Message ID AMSPR04MB3095303E55F94911E7F8654E2360@AMSPR04MB309.eurprd04.prod.outlook.com
State New
Headers show

Commit Message

Tom Hochstein July 18, 2016, 4:46 p.m.
The parser incorrectly treated anything less than 2 args as an error.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 meta/recipes-graphics/wayland/weston-init/weston-start | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index d7358ba..cd64216 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -6,7 +6,7 @@  export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
 
 usage() {
     cat <<EOF
-    $0 <openvt arguments> -- <weston options>
+    $0 [<openvt arguments>] [-- <weston options>]
 EOF
 }
 
@@ -23,11 +23,6 @@  add_openvt_argument() {
 	openvt_args="$openvt_args $1"
 }
 
-if test $# -lt 2; then
-	usage
-	exit 1
-fi
-
 if [ -n "$WAYLAND_DISPLAY" ]; then
 	echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
 	exit 1