tools/lguest: Don't bork the terminal in case of wrong args
authorDaniel Baluta <daniel.baluta@intel.com>
Wed, 7 Sep 2016 10:19:34 +0000 (19:49 +0930)
committerIngo Molnar <mingo@kernel.org>
Thu, 8 Sep 2016 06:05:24 +0000 (08:05 +0200)
commitdb91e2370e087967cb6b6425c092188767fb5e00
tree060de0066cd9309329bf716478d6dc2d2c994390
parentcc2187a6e037bc64404f63c6d650ff263c2200c0
tools/lguest: Don't bork the terminal in case of wrong args

Running lguest without arguments or with a wrong argument name
borks the terminal, because the cleanup handler is set up too late
in the initialization process.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/lguest/lguest.c