[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH master f14-branch 1/2] Adding output to method selection process



---
 loader/method.c |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/loader/method.c b/loader/method.c
index 5b4f504..b4caba9 100644
--- a/loader/method.c
+++ b/loader/method.c
@@ -524,6 +524,8 @@ int getFileFromBlockDevice(char *device, char *path, char * dest) {
 }
 
 void setStage2LocFromCmdline(char * arg, struct loaderData_s * ld) {
+    logMessage(INFO, "Setting stage2 from %s", arg);
+
     if (!strncmp(arg, "nfs:", 4)) {
         ld->method = METHOD_NFS;
         ld->stage2Data = calloc(sizeof(struct nfsInstallData), 1);
@@ -533,6 +535,12 @@ void setStage2LocFromCmdline(char * arg, struct loaderData_s * ld) {
           &(((struct nfsInstallData *)ld->stage2Data)->directory),
           &(((struct nfsInstallData *)ld->stage2Data)->mountOpts));
         stripTrailingSlash(((struct nfsInstallData *)ld->stage2Data)->directory);
+
+        logMessage(INFO, "method nfs - %s / %s / %s",
+                          (((struct nfsInstallData *)ld->stage2Data)->host),
+                          (((struct nfsInstallData *)ld->stage2Data)->directory),
+                          (((struct nfsInstallData *)ld->stage2Data)->mountOpts)
+                    );
     } else if (!strncmp(arg, "nfsiso:", 7)) {
         ld->method = METHOD_NFS;
         ld->stage2Data = calloc(sizeof(struct nfsInstallData), 1);
@@ -541,30 +549,45 @@ void setStage2LocFromCmdline(char * arg, struct loaderData_s * ld) {
           &(((struct nfsInstallData *)ld->stage2Data)->host),
           &(((struct nfsInstallData *)ld->stage2Data)->directory),
           &(((struct nfsInstallData *)ld->stage2Data)->mountOpts));
+
+        logMessage(INFO, "method nfsiso - %s / %s / %s",
+                          (((struct nfsInstallData *)ld->stage2Data)->host),
+                          (((struct nfsInstallData *)ld->stage2Data)->directory),
+                          (((struct nfsInstallData *)ld->stage2Data)->mountOpts)
+                    );
     } else if (!strncmp(arg, "ftp:", 4) ||
                !strncmp(arg, "http", 4)) {
         ld->method = METHOD_URL;
         ld->stage2Data = calloc(sizeof(urlInstallData), 1);
         ((urlInstallData *)ld->stage2Data)->url = strdup(arg);
+
+        logMessage(INFO, "method url - %s", ((urlInstallData *)ld->stage2Data)->url);
     } else if (!strncmp(arg, "cdrom:", 6)) {
         ld->method = METHOD_CDROM;
+
+        logMessage(INFO, "method cdrom");
     } else if (!strncmp(arg, "harddrive:", 10) ||
                !strncmp(arg, "hd:", 3)) {
         size_t offset;
 
-	arg += strcspn(arg, ":");
-	if (!*arg || !*(arg+1))
-	    return;
-	arg += 1;
+        arg += strcspn(arg, ":");
+        if (!*arg || !*(arg+1))
+            return;
+        arg += 1;
         offset = strcspn(arg, ":");
 
         ld->method = METHOD_HD;
         ld->stage2Data = calloc(sizeof(struct hdInstallData), 1);
         ((struct hdInstallData *)ld->stage2Data)->partition = strndup(arg, offset);
-	arg += offset;
-	if (*arg && *(arg+1))
+        arg += offset;
+        if (*arg && *(arg+1))
             ((struct hdInstallData *)ld->stage2Data)->directory = strdup(arg+1);
         else
             ((struct hdInstallData *)ld->stage2Data)->directory = NULL;
+
+        logMessage(INFO, "method hd - %s / %s",
+                        ((struct hdInstallData *)ld->stage2Data)->partition,
+                        ((struct hdInstallData *)ld->stage2Data)->directory
+                    );
     }
 }
-- 
1.7.2.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]