diff options
author | msivak <msivak> | 2007-08-23 06:59:21 +0000 |
---|---|---|
committer | msivak <msivak> | 2007-08-23 06:59:21 +0000 |
commit | 4bb57cf4b10e3fe48533efb87ec1c01b43d78566 (patch) | |
tree | 0e518046512e09cbf85d0e43814447645ad4733d /loader2 | |
parent | 229ec26ea18efb0b03970bdd1fda02c57b28d143 (diff) | |
download | anaconda-4bb57cf4b10e3fe48533efb87ec1c01b43d78566.tar.gz anaconda-4bb57cf4b10e3fe48533efb87ec1c01b43d78566.tar.xz anaconda-4bb57cf4b10e3fe48533efb87ec1c01b43d78566.zip |
#244531 - Show the architecture during install
* loader2/loader.h: Add getProductArch method.
* loader2/loader.c: Populate productArch and define getProductArch.
Show the architecture in stage1.
* constants.py: add productArch
* product.py: populate productArch
* text.py: Show the architecture during text mode stage2.
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/loader.c | 22 | ||||
-rw-r--r-- | loader2/loader.h | 1 |
2 files changed, 21 insertions, 2 deletions
diff --git a/loader2/loader.c b/loader2/loader.c index 1130f3bc5..07ccc2660 100644 --- a/loader2/loader.c +++ b/loader2/loader.c @@ -151,7 +151,10 @@ void doShell(void) { void startNewt(void) { if (!newtRunning) { - char *buf = sdupprintf(_("Welcome to %s"), getProductName()); + char *buf; + if(getProductArch()) buf = sdupprintf(_("Welcome to %s for %s"), getProductName(), getProductArch()); + else buf = sdupprintf(_("Welcome to %s"), getProductName()); + newtInit(); newtCls(); newtDrawRootText(0, 0, buf); @@ -174,6 +177,8 @@ void stopNewt(void) { static char * productName = NULL; static char * productPath = NULL; +static char * productArch = NULL; +static char * productStamp = NULL; static void initProductInfo(void) { FILE *f; @@ -184,9 +189,13 @@ static void initProductInfo(void) { productName = strdup("anaconda"); productPath = strdup("anaconda"); } else { + productStamp = malloc(256); productName = malloc(256); productPath = malloc(256); - productName = fgets(productName, 256, f); /* stamp time */ + productStamp = fgets(productStamp, 256, f); /* stamp time and architecture */ + productArch = strstr(productStamp, "."); /* architecture is separated by dot */ + if(productArch) productArch++; + productName = fgets(productName, 256, f); /* product name */ productPath = fgets(productPath, 256, f); /* product version */ productPath = fgets(productPath, 256, f); /* product path */ @@ -202,6 +211,8 @@ static void initProductInfo(void) { i--; } } + + if(!productArch) productArch = strdup("unknown architecture"); } char * getProductName(void) { @@ -211,6 +222,13 @@ char * getProductName(void) { return productName; } +char * getProductArch(void) { + if (!productArch) { + initProductInfo(); + } + return productArch; +} + char * getProductPath(void) { if (!productPath) { initProductInfo(); diff --git a/loader2/loader.h b/loader2/loader.h index 5c47e1cba..7ab83bb51 100644 --- a/loader2/loader.h +++ b/loader2/loader.h @@ -90,6 +90,7 @@ void startNewt(void); void stopNewt(void); char * getProductName(void); char * getProductPath(void); +char * getProductArch(void); #include "modules.h" #include "moduledeps.h" |