FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-01-2011, 09:59 PM
Will Woods
 
Default loader: set virtpconsole flag (not serial!) when using virt consoles

More untangling of previous refactoring work. Virtualized systems with
fancy consoles usually end up with 'console=XXX' on the boot
commandline. This gets passed along through the 'virtpconsole' flag, so
set it appropriately in loader so we can use it inside anaconda.
---
loader/loader.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index 56c0718..69f1e4e 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1936,6 +1936,7 @@ int main(int argc, char ** argv) {
struct loaderData_s loaderData;
struct termios orig_cmode;
int orig_flags;
+ char *virtpcon = NULL;

char *path, *fmt;
GSList *dd, *dditer;
@@ -2008,8 +2009,17 @@ int main(int argc, char ** argv) {

logMessage(INFO, "anaconda version %s on %s starting", VERSION, getProductArch());

- if (init_serial(&orig_cmode, &orig_flags, cmdline))
- flags |= LOADER_FLAGS_SERIAL;
+ if (init_serial(&orig_cmode, &orig_flags, cmdline)) {
+ /* init_serial replaces fd(0,1,2) with one of three things:
+ * /dev/ttyS0, /dev/console, or a fancy virtual console. */
+ virtpcon = ttyname(0);
+ if (virtpcon != NULL) {
+ if (!strcmp(virtpcon, "/dev/ttyS0") || !strcmp(virtpcon, "/dev/console"))
+ flags |= LOADER_FLAGS_SERIAL;
+ else
+ flags |= LOADER_FLAGS_VIRTPCONSOLE;
+ }
+ }

if ((FL_SERIAL(flags) || FL_VIRTPCONSOLE(flags)) &&
!hasGraphicalOverride()) {
@@ -2338,12 +2348,10 @@ int main(int argc, char ** argv) {
else if (FL_SELINUX(flags))
*argptr++ = "--selinux";

- /*
if (FL_VIRTPCONSOLE(flags)) {
*argptr++ = "--virtpconsole";
*argptr++ = virtpcon;
}
- */

if (loaderData.updatessrc && FL_UPDATES(flags)) {
*argptr++ = "--updates";
--
1.7.7.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 03:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org