- }
-
- if (*ep) {
- if (*ep != ':') {
- puts("** Invalid boot device, use `dev[:part]' **\n");
- return 1;
- }
- part = simple_strtoul(++ep, NULL, 16);
- }
-
- if (part != 0) {
- if (get_partition_info(zfs_dev_desc, part, &info)) {
- printf("** Bad partition %lu **\n", part);
- return 1;
- }
-
- if (strncmp((char *)info.type, BOOT_PART_TYPE,
- strlen(BOOT_PART_TYPE)) != 0) {
- printf("** Invalid partition type \"%s\" (expect \"" BOOT_PART_TYPE "\")\n",
- info.type);
- return 1;
- }
- printf("Loading file \"%s\" "
- "from %s device %d:%lu %s\n",
- filename, argv[1], dev, part, info.name);
- } else {
- printf("Loading file \"%s\" from %s device %d\n",
- filename, argv[1], dev);
- }