+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2001
* Hans-Joerg Frieden, Hyperion Entertainment
* Hans-JoergF@hyperion-entertainment.com
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <command.h>
+#include <env.h>
#include <ide.h>
#include "part_amiga.h"
-
-#ifdef HAVE_BLOCK_DEVICE
+#include <part.h>
#undef AMIGA_DEBUG
int limit;
char *s;
- s = getenv("amiga_scanlimit");
+ s = env_get("amiga_scanlimit");
if (s)
- limit = simple_strtoul(s, NULL, 10);
+ limit = dectoul(s, NULL);
else
limit = AMIGA_BLOCK_LIMIT;
int limit;
char *s;
- s = getenv("amiga_scanlimit");
+ s = env_get("amiga_scanlimit");
if (s)
- limit = simple_strtoul(s, NULL, 10);
+ limit = dectoul(s, NULL);
else
limit = AMIGA_BLOCK_LIMIT;
* Get info about a partition
*/
static int part_get_info_amiga(struct blk_desc *dev_desc, int part,
- disk_partition_t *info)
+ struct disk_partition *info)
{
struct partition_block *p = find_partition(dev_desc, part-1);
struct amiga_part_geometry *g;
U_BOOT_PART_TYPE(amiga) = {
.name = "AMIGA",
.part_type = PART_TYPE_AMIGA,
+ .max_entries = AMIGA_ENTRY_NUMBERS,
.get_info = part_get_info_amiga,
.print = part_print_amiga,
.test = part_test_amiga,
};
-
-#endif