-#if 0
-char *
-parse_device_path(char *of_device, char **file_spec, int *partition)
-{
- char *p, *last;
-
- if (file_spec)
- *file_spec = NULL;
- if (partition)
- *partition = -1;
-
- DEBUG_F("of_device before parsing: %s\n", of_device);
- p = strchr(of_device, ':');
- DEBUG_F("of_device after parsing: %s\n", p);
-
- if (!p) { /* if null terminated we are finished */
- DEBUG_F("of_device: %s\n", of_device);
- return of_device;
- }
-#if 0 /* this is broken crap, breaks netboot entirely */
- else if (strstr(of_device, "ethernet") != NULL)
- p = strchr(of_device, ','); /* skip over ip all the way to the ',' */
- else if (strstr(of_device, "enet") != NULL)
- p = strchr(of_device, ','); /* skip over ip all the way to the ',' */
-#endif
- *p = 0;
- last = ++p; /* sets to start of second part */
- while(*p && *p != ',') {
- if (!isdigit (*p)) {
- p = last;
- break;
- }
- ++p;
- }
- if (p != last) {
- *(p++) = 0;
- if (partition)
- *partition = simple_strtol(last, NULL, 10);
- }
- if (*p && file_spec)
- *file_spec = p;
-
- DEBUG_F("of_device: %s\n", of_device);
- strcat(of_device, ":");
- DEBUG_F("of_device after strcat: %s\n", of_device);
- return of_device;
-}
-
-int
-validate_fspec( struct boot_fspec_t* spec,
- char* default_device,
- int default_part)
-{
- if (!spec->file) {
- spec->file = spec->dev;
- spec->dev = NULL;
- }
- if (spec->part == -1)
- spec->part = default_part;
- if (!spec->dev)
- spec->dev = default_device;
- if (!spec->file)
- return FILE_BAD_PATH;
- else if (spec->file[0] == ',')
- spec->file++;
-
- return FILE_ERR_OK;
-}
-
-#endif