configs: Add root redirect path in SE mode only when set

As it is now, the default behaviour, if chroot is not specified, is to
add a redirect path which is simply mappping "/" in guest to "/" in
host.  This patch avoids this unnecessary mapping, and adds a redirect
path to root only if chroot is specified.

Change-Id: Icbe863887330d7071e0005333b408ffc8cad41d6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23064
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2019-11-21 09:29:36 +00:00
parent ccc46bbc20
commit 653dfec89a
2 changed files with 12 additions and 10 deletions

View File

@@ -369,7 +369,7 @@ def addSEOptions(parser):
help="Redirect stdout to a file.")
parser.add_option("--errout", default="",
help="Redirect stderr to a file.")
parser.add_option("--chroot", action="store", type="string", default="/",
parser.add_option("--chroot", action="store", type="string", default=None,
help="The chroot option allows a user to alter the " \
"search path for processes running in SE mode. " \
"Normally, the search path would begin at the " \