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 > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-01-2010, 12:14 PM
Ales Kozumplik
 
Default memory: check for URL install in loader too (#596993).

---
loader/loader.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index fbbd13b..59d5beb 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1142,12 +1142,22 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
}

/* make sure they have enough ram */
-static void checkForRam(void) {
- if (totalMemory() < MIN_RAM) {
+static void checkForRam(int install_method) {
+ char reason_no[] = "";
+ char reason_method[] = " using this install method";
+ char *reason = reason_no;
+ int needed = MIN_RAM;
+
+ if (install_method == METHOD_URL) {
+ needed += URL_INSTALL_EXTRA_RAM;
+ reason = reason_method;
+ }
+
+ if (totalMemory() < needed) {
char *buf;

checked_asprintf(&buf, _("You do not have enough RAM to install %s "
- "on this machine."), getProductName());
+ "on this machine%s."), getProductName(), reason);

startNewt();
newtWinMessage(_("Error"), _("OK"), buf);
@@ -1535,6 +1545,7 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
}

logMessage(INFO, "starting STEP_STAGE2");
+ checkForRam(loaderData->method);
url = installMethods[validMethods[loaderData->method]].mountImage(
installMethods + validMethods[loaderData->method],
"/mnt/stage2", loaderData);
@@ -1949,7 +1960,7 @@ int main(int argc, char ** argv) {
}
initializeConsole();

- checkForRam();
+ checkForRam(-1);

/* iSeries vio console users will be ssh'ing in to the primary
partition, so use a terminal type that is appripriate */
--
1.7.0.1

_______________________________________________
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 09:46 AM.

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