X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=second%2Ffile.c;h=e4c379f4900b94c8c7a15c7807fa49afc68f343a;hb=4b9f2eb054f5f0975eef271e87ded51d6b697d9f;hp=3aaef8223b527b6b207b005e575ca05c5808e699;hpb=8d5a42062f8b88eaea91434e53973ce9f55589d9;p=tonyb-yaboot.git diff --git a/second/file.c b/second/file.c index 3aaef82..e4c379f 100644 --- a/second/file.c +++ b/second/file.c @@ -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;