config: exit with fatal() if error
If output redirection is activated, the error message is printed in simout. This change ensure it will be printed in simerr. Change-Id: Ie661ac6b6978bf2e4aaaccdf23134795d764d459 Signed-off-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr> Reviewed-on: https://gem5-review.googlesource.com/2221 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
parent
efcd8ae024
commit
f3e0ac2b06
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
||||||
# Copyright (c) 2012, 2015 ARM Limited
|
# Copyright (c) 2012, 2015 ARM Limited
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
# Copyright (c) 2017, Centre National de la Recherche Scientifique (CNRS)
|
||||||
|
#
|
||||||
# The license below extends only to copyright in the software and shall
|
# The license below extends only to copyright in the software and shall
|
||||||
# not be construed as granting a license to any other intellectual
|
# not be construed as granting a license to any other intellectual
|
||||||
# property including but not limited to intellectual property relating
|
# property including but not limited to intellectual property relating
|
||||||
|
@ -34,10 +36,12 @@
|
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# Authors: Andreas Sandberg
|
# Authors: Andreas Sandberg
|
||||||
|
# Pierre-Yves Peneau
|
||||||
|
|
||||||
import m5.objects
|
import m5.objects
|
||||||
import inspect
|
import inspect
|
||||||
import sys
|
import sys
|
||||||
|
from m5.util import fatal
|
||||||
from textwrap import TextWrapper
|
from textwrap import TextWrapper
|
||||||
|
|
||||||
# Dictionary of mapping names of real CPU models to classes.
|
# Dictionary of mapping names of real CPU models to classes.
|
||||||
|
@ -74,8 +78,7 @@ def get(name):
|
||||||
try:
|
try:
|
||||||
return _platform_classes[real_name]
|
return _platform_classes[real_name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print "%s is not a valid Platform model." % (name,)
|
fatal("%s is not a valid Platform model." % (name,))
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def print_platform_list():
|
def print_platform_list():
|
||||||
"""Print a list of available Platform classes including their aliases."""
|
"""Print a list of available Platform classes including their aliases."""
|
||||||
|
|
Loading…
Reference in a new issue