From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: longtaox.pang@intel.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH OSSTEST v2] grub: remove patch to disable submenu from 20_linux_xen overlay
Date: Wed, 6 May 2015 13:55:48 +0100 [thread overview]
Message-ID: <1430916948.2660.288.camel@citrix.com> (raw)
In-Reply-To: <1430916731.2660.286.camel@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On Wed, 2015-05-06 at 13:52 +0100, Ian Campbell wrote:
> > Can you please do that since you have the most up to date patch at hand.
> > Thanks!
>
> Sure.
Actually, I don't have a login for savanah.gnu.org, since I suppose you
already do would you mind doing it? (attached again for convenience)
Ian.
[-- Attachment #2: grub.v2.patch --]
[-- Type: text/x-patch, Size: 2670 bytes --]
--- /home/ianc/tmp/x/etc/grub.d/20_linux_xen 2013-07-03 04:39:20.000000000 +0100
+++ overlay/etc/grub.d/20_linux_xen 2015-04-21 11:09:57.777812773 +0100
@@ -81,10 +85,27 @@
recovery="$4"
args="$5"
xen_args="$6"
- if ${recovery} ; then
- title="$(gettext_quoted "%s, with Xen %s and Linux %s (recovery mode)")"
+ xsm="$7"
+ # If user wants to enable XSM support, make sure there's
+ # corresponding policy file.
+ if ${xsm} ; then
+ xenpolicy=`echo xenpolicy-$xen_version`
+ if test ! -e "${xen_dirname}/${xenpolicy}" ; then
+ return
+ fi
+ xen_args=`echo $xen_args flask=enforcing`
+ if ${recovery} ; then
+ title="$(gettext_quoted "%s, with Xen %s (XSM enabled) and Linux %s (recovery mode)")"
+ else
+ title="$(gettext_quoted "%s, with Xen %s (XSM enabled) and Linux %s")"
+ fi
else
- title="$(gettext_quoted "%s, with Xen %s and Linux %s")"
+ xenpolicy=""
+ if ${recovery} ; then
+ title="$(gettext_quoted "%s, with Xen %s and Linux %s (recovery mode)")"
+ else
+ title="$(gettext_quoted "%s, with Xen %s and Linux %s")"
+ fi
fi
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${xen_version}" "${version}"
if ! ${recovery} ; then
@@ -110,6 +131,13 @@
module ${rel_dirname}/${initrd}
EOF
fi
+ if test -n "${xenpolicy}" ; then
+ message="$(gettext_printf "Loading XSM policy ...")"
+ cat << EOF
+ echo '$message'
+ module ${rel_dirname}/${xenpolicy}
+EOF
+ fi
cat << EOF
}
EOF
@@ -133,7 +161,7 @@
if [ "x${linux_list}" = "x" ] ; then
exit 0
fi
-xen_list=`for i in /boot/xen*; do
+xen_list=`for i in /boot/xen[-.]*; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
@@ -175,10 +203,14 @@
fi
linux_entry "${OS}" "${version}" "${xen_version}" false \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" false
+ linux_entry "${OS}" "${version}" "${xen_version}" false \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" true
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" "${xen_version}" true \
- "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
+ "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}" false
+ linux_entry "${OS}" "${version}" "${xen_version}" true \
+ "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}" true
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-05-06 12:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 10:41 [PATCH OSSTEST v2] grub: remove patch to disable submenu from 20_linux_xen overlay Ian Campbell
2015-05-06 12:10 ` Wei Liu
2015-05-06 12:52 ` Ian Campbell
2015-05-06 12:55 ` Ian Campbell [this message]
2015-05-06 13:01 ` Wei Liu
2015-05-06 15:48 ` Ian Campbell
2015-05-20 15:27 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430916948.2660.288.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=longtaox.pang@intel.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.