else if ((ptr = strchr(ipath, ':')) != NULL) {
*ptr = 0;
result->dev = strdup(ipath);
else if ((ptr = strchr(ipath, ':')) != NULL) {
*ptr = 0;
result->dev = strdup(ipath);
- for (p = parts; p && !found; p=p->next) {
- DEBUG_F("number: %02d, start: 0x%08lx, length: 0x%08lx\n",
- p->part_number, p->part_start, p->part_size );
- if (partition == -1) {
- file->fs = fs_open( file, dev_name, p, file_name );
- if (file->fs != NULL)
- goto bail;
- }
- if ((partition >= 0) && (partition == p->part_number))
- found = p;
+ for (p = parts; p && !found; p=p->next) {
+ DEBUG_F("number: %02d, start: 0x%08lx, length: 0x%08lx\n",
+ p->part_number, p->part_start, p->part_size );
+ if (partition == -1) {
+ file->fs = fs_open( file, dev_name, p, file_name );
+ if (file->fs != NULL)
+ goto bail;
+ }
+ if ((partition >= 0) && (partition == p->part_number))
+ found = p;
- /* Note: we don't skip when found is NULL since we can, in some
- * cases, let OF figure out a default partition.
- */
- DEBUG_F( "Using OF defaults.. (found = %p)\n", found );
- file->fs = fs_open( file, dev_name, found, file_name );
+ /* Note: we don't skip when found is NULL since we can, in some
+ * cases, let OF figure out a default partition.
+ */
+ DEBUG_F( "Using OF defaults.. (found = %p)\n", found );
+ file->fs = fs_open( file, dev_name, found, file_name );
- file->fs = fs_of_netboot;
- return fs_of_netboot->open(file, dev_name, NULL, file_name);
+ file->fs = fs_of_netboot;
+ return fs_of_netboot->open(file, dev_name, NULL, file_name);
- memset(file, 0, sizeof(struct boot_file_t*));
- file->fs = &fs_default;
+ memset(file, 0, sizeof(struct boot_file_t*));
+ file->fs = &fs_default;
- DEBUG_F("dev_path = %s\nfile_name = %s\npartition = %d\n",
- spec->dev, spec->file, spec->part);
+ DEBUG_F("dev_path = %s\nfile_name = %s\npartition = %d\n",
+ spec->dev, spec->file, spec->part);
- switch(file->device_kind) {
- case FILE_DEVICE_BLOCK:
- DEBUG_F("device is a block device\n");
- return file_block_open(file, spec->dev, spec->file, spec->part);
- case FILE_DEVICE_NET:
- DEBUG_F("device is a network device\n");
- return file_net_open(file, spec->dev, spec->file);
- }
- return 0;
+ switch(file->device_kind) {
+ case FILE_DEVICE_BLOCK:
+ DEBUG_F("device is a block device\n");
+ return file_block_open(file, spec->dev, spec->file, spec->part);
+ case FILE_DEVICE_NET:
+ DEBUG_F("device is a network device\n");
+ return file_net_open(file, spec->dev, spec->file);
+ }
+ return 0;