]> git.ozlabs.org Git - yaboot.git/blobdiff - second/file.c
Commit yaboot 1.3.4-pre2
[yaboot.git] / second / file.c
index 3aaef8223b527b6b207b005e575ca05c5808e699..e4c379f4900b94c8c7a15c7807fa49afc68f343a 100644 (file)
@@ -48,7 +48,7 @@ parse_device_path(char *imagepath, char *defdevice, int defpart,
      result->file = NULL;
 
      if (!strstr(defdev, "ethernet") && !strstr(defdev, "enet")) {
-         if ((ptr = strchr(defdev, ':')) != NULL)
+         if ((ptr = strrchr(defdev, ':')) != NULL)
               *ptr = 0; /* remove trailing : from defdevice if necessary */
      }
 
@@ -62,6 +62,10 @@ parse_device_path(char *imagepath, char *defdevice, int defpart,
      }
 
      if (strstr(ipath, "ethernet") || strstr(ipath, "enet"))
+         if ((ptr = strstr(ipath, "bootp")) != NULL) { /* `n' key booting boots enet:bootp */
+              *ptr = 0;
+              result->dev = strdup(ipath);
+         } else
          result->dev = strdup(ipath);
      else if ((ptr = strchr(ipath, ':')) != NULL) {
          *ptr = 0;