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 10-13-2010, 03:11 PM
Chris Lumens
 
Default Add some debugging prints.

---
loader/cdinstall.c | 2 ++
loader/hdinstall.c | 2 ++
loader/loader.c | 26 +++++++++++++++++++++++---
loader/nfsinstall.c | 2 ++
loader/urlinstall.c | 2 ++
5 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/loader/cdinstall.c b/loader/cdinstall.c
index b69bea5..acdb036 100644
--- a/loader/cdinstall.c
+++ b/loader/cdinstall.c
@@ -400,6 +400,8 @@ int loadCdromImages(struct loaderData_s *loaderData) {
char *device = NULL;
char *tmp;

+ logMessage(DEBUGLVL, "looking for extras for CD/DVD install");
+
if (!loaderData->instRepo)
return 0;

diff --git a/loader/hdinstall.c b/loader/hdinstall.c
index 4b6c580..d52e969 100644
--- a/loader/hdinstall.c
+++ b/loader/hdinstall.c
@@ -99,6 +99,8 @@ static int ends_with_iso(char *dirname, struct dirent *ent) {
int loadHdImages(struct loaderData_s *loaderData) {
char *device = NULL, *dir = NULL, *path;

+ logMessage(DEBUGLVL, "looking for extras for HD install");
+
if (!loaderData->instRepo)
return 0;

diff --git a/loader/loader.c b/loader/loader.c
index 5b42305..2af0384 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1261,6 +1261,7 @@ static void doLoaderMain(struct loaderData_s *loaderData,
* override this check.
*/
if (!FL_ASKMETHOD(flags) && !loaderData->instRepo && findInstallCD(loaderData) == LOADER_OK) {
+ logMessage(DEBUGLVL, "Found installation media, so skipping lang and kbd");
skipLangKbd = 1;
flags |= LOADER_FLAGS_NOPASS;
}
@@ -1548,9 +1549,28 @@ static void doLoaderMain(struct loaderData_s *loaderData,
}

case STEP_EXTRAS: {
- /* FIXME - this is where we need to look for product.img,
- * updates.img, etc.
- */
+ switch (loaderData->method) {
+ case METHOD_CDROM:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_CDROM");
+ break;
+
+ case METHOD_HD:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_HD");
+ break;
+
+ case METHOD_NFS:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_NFS");
+ break;
+
+ case METHOD_URL:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_URL");
+ break;
+
+ default:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = ??");
+ break;
+ }
+
installMethods[validMethods[loaderData->method]].findExtras(loaderData);
step = STEP_DONE;
break;
diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index 1d22909..7ce0433 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -210,6 +210,8 @@ int loadNfsImages(struct loaderData_s *loaderData) {
char *host, *path, *opts;
char *url;

+ logMessage(DEBUGLVL, "looking for extras for NFS install");
+
if (!loaderData->instRepo)
return 0;

diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index ea40862..000c025 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -163,6 +163,8 @@ static void copyErrorFn (char *msg) {
int loadUrlImages(struct loaderData_s *loaderData) {
char *url;

+ logMessage(DEBUGLVL, "looking for extras for HTTP/FTP install");
+
if (!loaderData->instRepo)
return 0;

--
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-14-2010, 04:29 PM
Ales Kozumplik
 
Default Add some debugging prints.

On 10/13/2010 05:11 PM, Chris Lumens wrote:


+ switch (loaderData->method) {
+ case METHOD_CDROM:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_CDROM");
+ break;
+
+ case METHOD_HD:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_HD");
+ break;
+
+ case METHOD_NFS:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_NFS");
+ break;
+
+ case METHOD_URL:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = METHOD_URL");
+ break;
+
+ default:
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = ??");
+ break;
+ }


Can you define a lookup array for the method names instead?

Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-14-2010, 06:14 PM
Chris Lumens
 
Default Add some debugging prints.

---
loader/cdinstall.c | 2 ++
loader/hdinstall.c | 2 ++
loader/loader.c | 15 ++++++++-------
loader/method.h | 1 +
loader/nfsinstall.c | 2 ++
loader/urlinstall.c | 2 ++
6 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/loader/cdinstall.c b/loader/cdinstall.c
index b69bea5..acdb036 100644
--- a/loader/cdinstall.c
+++ b/loader/cdinstall.c
@@ -400,6 +400,8 @@ int loadCdromImages(struct loaderData_s *loaderData) {
char *device = NULL;
char *tmp;

+ logMessage(DEBUGLVL, "looking for extras for CD/DVD install");
+
if (!loaderData->instRepo)
return 0;

diff --git a/loader/hdinstall.c b/loader/hdinstall.c
index 4b6c580..d52e969 100644
--- a/loader/hdinstall.c
+++ b/loader/hdinstall.c
@@ -99,6 +99,8 @@ static int ends_with_iso(char *dirname, struct dirent *ent) {
int loadHdImages(struct loaderData_s *loaderData) {
char *device = NULL, *dir = NULL, *path;

+ logMessage(DEBUGLVL, "looking for extras for HD install");
+
if (!loaderData->instRepo)
return 0;

diff --git a/loader/loader.c b/loader/loader.c
index 5b42305..9fccd44 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -129,10 +129,10 @@ static int init_sig = SIGUSR1; /* default to shutdown=halt */
static const char *LANG_DEFAULT = "en_US.UTF-8";

static struct installMethod installMethods[] = {
- { N_("Local CD/DVD"), 0, DEVICE_CDROM, promptForCdrom, loadCdromImages},
- { N_("Hard drive"), 0, DEVICE_DISK, promptForHardDrive, loadHdImages },
- { N_("NFS directory"), 1, DEVICE_NETWORK, promptForNfs, loadNfsImages },
- { "URL", 1, DEVICE_NETWORK, promptForUrl, loadUrlImages},
+ { N_("Local CD/DVD"), "METHOD_CDROM", 0, DEVICE_CDROM, promptForCdrom, loadCdromImages},
+ { N_("Hard drive"), "METHOD_HD", 0, DEVICE_DISK, promptForHardDrive, loadHdImages },
+ { N_("NFS directory"), "METHOD_NFS", 1, DEVICE_NETWORK, promptForNfs, loadNfsImages },
+ { "URL", "METHOD_URL", 1, DEVICE_NETWORK, promptForUrl, loadUrlImages},
};
static int numMethods = sizeof(installMethods) / sizeof(struct installMethod);

@@ -1261,6 +1261,7 @@ static void doLoaderMain(struct loaderData_s *loaderData,
* override this check.
*/
if (!FL_ASKMETHOD(flags) && !loaderData->instRepo && findInstallCD(loaderData) == LOADER_OK) {
+ logMessage(DEBUGLVL, "Found installation media, so skipping lang and kbd");
skipLangKbd = 1;
flags |= LOADER_FLAGS_NOPASS;
}
@@ -1548,9 +1549,9 @@ static void doLoaderMain(struct loaderData_s *loaderData,
}

case STEP_EXTRAS: {
- /* FIXME - this is where we need to look for product.img,
- * updates.img, etc.
- */
+ logMessage(DEBUGLVL, "in STEP_EXTRAS, method = %s",
+ installMethods[validMethods[loaderData->method]].desc);
+
installMethods[validMethods[loaderData->method]].findExtras(loaderData);
step = STEP_DONE;
break;
diff --git a/loader/method.h b/loader/method.h
index c8d8ce0..0de8914 100644
--- a/loader/method.h
+++ b/loader/method.h
@@ -33,6 +33,7 @@ enum {

struct installMethod {
char * name;
+ char * desc;
int network;
enum deviceType type;
int (*prompt)(struct loaderData_s *loaderData);
diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index 1d22909..7ce0433 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -210,6 +210,8 @@ int loadNfsImages(struct loaderData_s *loaderData) {
char *host, *path, *opts;
char *url;

+ logMessage(DEBUGLVL, "looking for extras for NFS install");
+
if (!loaderData->instRepo)
return 0;

diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index ea40862..000c025 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -163,6 +163,8 @@ static void copyErrorFn (char *msg) {
int loadUrlImages(struct loaderData_s *loaderData) {
char *url;

+ logMessage(DEBUGLVL, "looking for extras for HTTP/FTP install");
+
if (!loaderData->instRepo)
return 0;

--
1.7.1.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 05:08 AM.

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