From 5613f9fab88b71f14259856b390f1cc989b602bf Mon Sep 17 00:00:00 2001 From: Ethan Benson Date: Tue, 26 Mar 2002 15:00:49 +0000 Subject: [PATCH 1/1] Commit yaboot 1.3.4-pre3 Commit yaboot 1.3.4-pre3. git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-7 --- ChangeLog | 20 +++++++ Makefile | 2 +- changelog | 10 ++++ include/debug.h | 45 +++++++++++++++ include/errors.h | 4 ++ include/file.h | 4 -- include/fs.h | 26 --------- include/partition.h | 6 +- include/prom.h | 1 + second/cfg.c | 1 + second/file.c | 132 +++---------------------------------------- second/fs_ext2.c | 1 + second/fs_of.c | 1 + second/fs_reiserfs.c | 2 +- second/fs_xfs.c | 1 + second/partition.c | 69 ++++++++++++++++++---- second/prom.c | 30 ++++++++++ second/yaboot.c | 123 +++++++++++++++++++++++----------------- ybin/ybin | 4 +- 19 files changed, 258 insertions(+), 224 deletions(-) create mode 100644 include/debug.h diff --git a/ChangeLog b/ChangeLog index 5daeea0..5cfcdca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,26 @@ # tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3 # +2002-03-26 15:00:49 GMT Ethan Benson patch-7 + + Summary: + Commit yaboot 1.3.4-pre3 + Revision: + yaboot--devel--1.3--patch-7 + + Commit yaboot 1.3.4-pre3. + + new files: + include/.arch-ids/debug.h.id include/debug.h + + modified files: + ChangeLog Makefile changelog include/errors.h include/file.h + include/fs.h include/partition.h include/prom.h second/cfg.c + second/file.c second/fs_ext2.c second/fs_of.c + second/fs_reiserfs.c second/fs_xfs.c second/partition.c + second/prom.c second/yaboot.c ybin/ybin + + 2002-03-26 14:42:58 GMT Ethan Benson patch-6 Summary: diff --git a/Makefile b/Makefile index ff02872..5f6fc9a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ include Config -VERSION = 1.3.4pre2 +VERSION = 1.3.4pre3 # Debug mode (spam/verbose) DEBUG = 0 # make install vars diff --git a/changelog b/changelog index 9f42c59..477ca6c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,13 @@ +2001-10-12 Ethan Benson + + * Version 1.3.4pre3 + + * ybin: Correct a verbosity message. + + * yaboot: + - Add non-fatal warning when bootstrap partition has wrong type (pmac only). + - Minor code rearrangment. + 2001-10-10 Ethan Benson * Version 1.3.4pre2 diff --git a/include/debug.h b/include/debug.h new file mode 100644 index 0000000..7b5665d --- /dev/null +++ b/include/debug.h @@ -0,0 +1,45 @@ +/* + * Debug defines + * + * Copyright (C) 2001 Ethan Benson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#if DEBUG +# define DEBUG_ENTER prom_printf( "--> %s\n", __PRETTY_FUNCTION__ ) +# define DEBUG_LEAVE(str) \ + prom_printf( "<-- %s - %s\n", __PRETTY_FUNCTION__, #str ) +# define DEBUG_LEAVE_F(args...)\ +{\ + prom_printf( "<-- %s - %d\n", __PRETTY_FUNCTION__, ## args );\ +} +# define DEBUG_F(fmt, args...)\ +{\ + prom_printf( " %s - ", __PRETTY_FUNCTION__ );\ + prom_printf( fmt, ## args );\ +} +# define DEBUG_OPEN DEBUG_F( "dev=%s, part=0x%p (%d), file_name=%s\n",\ + dev_name, part, part ? part->part_number : -1,\ + file_name) +# define DEBUG_SLEEP prom_sleep(3) +#else +#define DEBUG_ENTER +#define DEBUG_LEAVE(x) +#define DEBUG_LEAVE_F(args...) +#define DEBUG_F(fmt, args...) +#define DEBUG_OPEN +#define DEBUG_SLEEP +#endif diff --git a/include/errors.h b/include/errors.h index c4950e5..866b379 100644 --- a/include/errors.h +++ b/include/errors.h @@ -34,3 +34,7 @@ #define FILE_ERR_LENGTH -10 #define FILE_ERR_FSBUSY -11 #define FILE_ERR_BADDEV -12 + +/* Device kind */ +#define FILE_DEVICE_BLOCK 1 +#define FILE_DEVICE_NET 2 diff --git a/include/file.h b/include/file.h index 03c5c6f..8717dd3 100644 --- a/include/file.h +++ b/include/file.h @@ -31,10 +31,6 @@ struct boot_file_t; #define FILE_MAX_PATH 1024 -/* Device kind */ -#define FILE_DEVICE_BLOCK 1 -#define FILE_DEVICE_NET 2 - struct boot_fspec_t { char* dev; /* OF device path */ int part; /* Partition number or -1 */ diff --git a/include/fs.h b/include/fs.h index 647c37a..6aad90e 100644 --- a/include/fs.h +++ b/include/fs.h @@ -50,30 +50,4 @@ extern const struct fs_t *fs_of_netboot; const struct fs_t *fs_open(struct boot_file_t *file, const char *dev_name, struct partition_t *part, const char *file_name); -#if DEBUG -# define DEBUG_ENTER prom_printf( "--> %s\n", __PRETTY_FUNCTION__ ) -# define DEBUG_LEAVE(str) \ - prom_printf( "<-- %s - %s\n", __PRETTY_FUNCTION__, #str ) -# define DEBUG_LEAVE_F(args...)\ -{\ - prom_printf( "<-- %s - %d\n", __PRETTY_FUNCTION__, ## args );\ -} -# define DEBUG_F(fmt, args...)\ -{\ - prom_printf( " %s - ", __PRETTY_FUNCTION__ );\ - prom_printf( fmt, ## args );\ -} -# define DEBUG_OPEN DEBUG_F( "dev=%s, part=0x%p (%d), file_name=%s\n",\ - dev_name, part, part ? part->part_number : -1,\ - file_name) -# define DEBUG_SLEEP prom_sleep(3) -#else -#define DEBUG_ENTER -#define DEBUG_LEAVE(x) -#define DEBUG_LEAVE_F(args...) -#define DEBUG_F(fmt, args...) -#define DEBUG_OPEN -#define DEBUG_SLEEP -#endif - #endif diff --git a/include/partition.h b/include/partition.h index 244227f..cc4fc3a 100644 --- a/include/partition.h +++ b/include/partition.h @@ -33,15 +33,15 @@ struct partition_t; struct partition_t { struct partition_t* next; int part_number; - char part_name[MAX_PART_NAME]; + char part_type[MAX_PART_NAME]; + char part_name[MAX_PART_NAME]; unsigned long part_start; /* In blocks */ unsigned long part_size; /* In blocks */ unsigned short blocksize; }; extern struct partition_t* partitions_lookup(const char *device); +extern char *get_part_type(char *device, int partition); extern void partitions_free(struct partition_t* list); - - #endif diff --git a/include/prom.h b/include/prom.h index 546d082..69a8120 100644 --- a/include/prom.h +++ b/include/prom.h @@ -87,6 +87,7 @@ void prom_map (void *phys, void *virt, int size); prom_handle prom_finddevice (char *name); prom_handle prom_findpackage (char *path); int prom_getprop (prom_handle dev, char *name, void *buf, int len); +int prom_get_devtype (char *device); /* misc */ diff --git a/second/cfg.c b/second/cfg.c index 00414be..58b3d60 100644 --- a/second/cfg.c +++ b/second/cfg.c @@ -64,6 +64,7 @@ CONFIG cf_options[] = {cft_strg, "init-message", NULL}, {cft_strg, "fgcolor", NULL}, {cft_strg, "bgcolor", NULL}, + {cft_strg, "ptypewarning", NULL}, {cft_end, NULL, NULL}}; CONFIG cf_image[] = diff --git a/second/file.c b/second/file.c index e4c379f..712222c 100644 --- a/second/file.c +++ b/second/file.c @@ -26,6 +26,7 @@ #include "partition.h" #include "fs.h" #include "errors.h" +#include "debug.h" extern char bootdevice[1024]; @@ -91,76 +92,6 @@ parse_device_path(char *imagepath, char *defdevice, int defpart, return 1; } -#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 static int file_block_open( struct boot_file_t* file, @@ -253,71 +184,26 @@ static struct fs_t fs_default = }; -int open_file( const struct boot_fspec_t* spec, - struct boot_file_t* file) +int open_file(const struct boot_fspec_t* spec, struct boot_file_t* file) { -// static char temp[1024]; - static char temps[64]; -// char *dev_name; -// char *file_name = NULL; - phandle dev; int result; - int partition; memset(file, 0, sizeof(struct boot_file_t*)); file->fs = &fs_default; - /* Lookup the OF device path */ - /* First, see if a device was specified for the kernel - * if not, we hope that the user wants a kernel on the same - * drive and partition as yaboot itself */ -#if 0 /* this is crap */ - if (!spec->dev) - strcpy(spec->dev, bootdevice); - strncpy(temp,spec->dev,1024); - dev_name = parse_device_path(temp, &file_name, &partition); - if (file_name == NULL) - file_name = (char *)spec->file; - if (file_name == NULL) { - prom_printf("Configuration error: null filename\n"); - return FILE_ERR_NOTFOUND; - } - if (partition == -1) -#endif - partition = spec->part; - - DEBUG_F("dev_path = %s\nfile_name = %s\npartition = %d\n", - spec->dev, spec->file, partition); - - /* Find OF device phandle */ - dev = prom_finddevice(spec->dev); - if (dev == PROM_INVALID_HANDLE) { - return FILE_ERR_BADDEV; - } - - DEBUG_F("dev_phandle = %p\n", dev); + spec->dev, spec->file, spec->part); - /* Check the kind of device */ - result = prom_getprop(dev, "device_type", temps, 63); - if (result == -1) { - prom_printf("can't get for device\n"); - return FILE_ERR_BADDEV; - } - temps[result] = 0; - if (!strcmp(temps, "block")) - file->device_kind = FILE_DEVICE_BLOCK; - else if (!strcmp(temps, "network")) - file->device_kind = FILE_DEVICE_NET; - else { - prom_printf("Unkown device type <%s>\n", temps); - return FILE_ERR_BADDEV; - } + result = prom_get_devtype(spec->dev); + if (result > 0) + file->device_kind = result; + else + return result; 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, partition); + 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); diff --git a/second/fs_ext2.c b/second/fs_ext2.c index af3d115..66e1ba8 100644 --- a/second/fs_ext2.c +++ b/second/fs_ext2.c @@ -34,6 +34,7 @@ #include "partition.h" #include "fs.h" #include "errors.h" +#include "debug.h" #define FAST_VERSION #define MAX_READ_RANGE 256 diff --git a/second/fs_of.c b/second/fs_of.c index 2dbc333..7b7f169 100644 --- a/second/fs_of.c +++ b/second/fs_of.c @@ -36,6 +36,7 @@ #include "partition.h" #include "fs.h" #include "errors.h" +#include "debug.h" #define LOAD_BUFFER_POS 0x600000 #define LOAD_BUFFER_SIZE 0x400000 diff --git a/second/fs_reiserfs.c b/second/fs_reiserfs.c index 28f6d4e..fd5c079 100644 --- a/second/fs_reiserfs.c +++ b/second/fs_reiserfs.c @@ -27,9 +27,9 @@ #include "stdlib.h" #include "fs.h" #include "errors.h" +#include "debug.h" #include "reiserfs/reiserfs.h" - /* Exported in struct fs_t */ static int reiserfs_open( struct boot_file_t *file, const char *dev_name, struct partition_t *part, const char *file_name ); diff --git a/second/fs_xfs.c b/second/fs_xfs.c index 866ceac..98684a2 100644 --- a/second/fs_xfs.c +++ b/second/fs_xfs.c @@ -29,6 +29,7 @@ #include "fs.h" #include "xfs/xfs.h" #include "errors.h" +#include "debug.h" #define SECTOR_BITS 9 diff --git a/second/partition.c b/second/partition.c index 39f23ca..fff169c 100644 --- a/second/partition.c +++ b/second/partition.c @@ -29,6 +29,8 @@ #include "prom.h" #include "string.h" #include "linux/iso_fs.h" +#include "debug.h" +#include "errors.h" /* We currently don't check the partition type, some users * are putting crap there and still expect it to work... @@ -54,14 +56,16 @@ static unsigned long swab32(unsigned long value); static unsigned char block_buffer[MAX_BLOCK_SIZE]; static void -add_new_partition( struct partition_t** list, int part_number, - unsigned long part_start, unsigned long part_size, - unsigned short part_blocksize ) +add_new_partition(struct partition_t** list, int part_number, const char *part_type, + const char *part_name, unsigned long part_start, unsigned long part_size, + unsigned short part_blocksize) { struct partition_t* part; part = (struct partition_t*)malloc(sizeof(struct partition_t)); part->part_number = part_number; + strncpy(part->part_type, part_type, MAX_PART_NAME); + strncpy(part->part_name, part_name, MAX_PART_NAME); part->part_start = part_start; part->part_size = part_size; part->blocksize = part_blocksize; @@ -132,6 +136,8 @@ partition_mac_lookup( const char *dev_name, prom_handle disk, add_new_partition( list, /* partition list */ block, /* partition number */ + part->type, /* type */ + part->name, /* name */ part->start_block + part->data_start, /* start */ part->data_count, /* size */ ptable_block_size ); @@ -158,6 +164,8 @@ partition_fdisk_lookup( const char *dev_name, prom_handle disk, if (part->sys_ind == LINUX_NATIVE) { add_new_partition( list, partition, + "Linux", /* type */ + '\0', /* name */ swab32(*(unsigned int *)(part->start4)), swab32(*(unsigned int *)(part->size4)), 512 /*blksize*/ ); @@ -217,9 +225,8 @@ partitions_lookup(const char *device) goto bail; } prom_blksize = prom_getblksize(disk); -#if DEBUG - prom_printf("block size of device is %d\n", prom_blksize); -#endif + DEBUG_F("block size of device is %d\n", prom_blksize); + if (prom_blksize <= 1) prom_blksize = 512; if (prom_blksize > MAX_BLOCK_SIZE) { @@ -229,7 +236,7 @@ partitions_lookup(const char *device) /* Read boot blocs */ if (prom_readblocks(disk, 0, 1, block_buffer) != 1) { - prom_printf("Can't read boot blocs\n"); + prom_printf("Can't read boot blocks\n"); goto bail; } if (desc->signature == MAC_DRIVER_MAGIC) { @@ -239,11 +246,13 @@ partitions_lookup(const char *device) /* fdisk partition format */ partition_fdisk_lookup(device, disk, prom_blksize, &list); } else if (prom_blksize == 2048 && identify_iso_fs(disk, &iso_root_block)) { - add_new_partition( &list, - 0, - iso_root_block, - 0, - prom_blksize); + add_new_partition(&list, + 0, + '\0', + '\0', + iso_root_block, + 0, + prom_blksize); prom_printf("ISO9660 disk\n"); } else { prom_printf("No supported partition table detected\n"); @@ -256,6 +265,36 @@ bail: return list; } +char * +get_part_type(char *device, int partition) +{ + struct partition_t* parts; + struct partition_t* p; + struct partition_t* found; + char *type = NULL; + + if (prom_get_devtype(device) != FILE_DEVICE_BLOCK) + return NULL; + + parts = partitions_lookup(device); + found = NULL; + + if (!parts) + return '\0'; + + for (p = parts; p && !found; p=p->next) { + DEBUG_F("number: %02d, start: 0x%08lx, length: 0x%08lx, type: %s, name: %s\n", + p->part_number, p->part_start, p->part_size, p->part_type, p->part_name); + if ((partition >= 0) && (partition == p->part_number)) { + type = strdup(p->part_type); + break; + } + } + if (parts) + partitions_free(parts); + return type; +} + /* Freed in reverse order of allocation to help malloc'ator */ void partitions_free(struct partition_t* list) @@ -282,3 +321,9 @@ swab32(unsigned long value) } +/* + * Local variables: + * c-file-style: "K&R" + * c-basic-offset: 5 + * End: + */ diff --git a/second/prom.c b/second/prom.c index cd12279..33dfcda 100644 --- a/second/prom.c +++ b/second/prom.c @@ -164,6 +164,36 @@ prom_get_options (char *name, void *mem, int len) return prom_getprop (prom_options, name, mem, len); } +int +prom_get_devtype (char *device) +{ + phandle dev; + int result; + char tmp[64]; + + /* Find OF device phandle */ + dev = prom_finddevice(device); + if (dev == PROM_INVALID_HANDLE) { + return FILE_ERR_BADDEV; + } + + /* Check the kind of device */ + result = prom_getprop(dev, "device_type", tmp, 63); + if (result == -1) { + prom_printf("can't get for device: %s\n", device); + return FILE_ERR_BADDEV; + } + tmp[result] = 0; + if (!strcmp(tmp, "block")) + return FILE_DEVICE_BLOCK; + else if (!strcmp(tmp, "network")) + return FILE_DEVICE_NET; + else { + prom_printf("Unkown device type <%s>\n", tmp); + return FILE_ERR_BADDEV; + } +} + void prom_init (prom_entry pp) { diff --git a/second/yaboot.c b/second/yaboot.c index 5eed2a3..23a6322 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -12,7 +12,7 @@ Because this program is derived from the corresponding file in the silo-0.64 distribution, it is also -sys + Copyright (C) 1996 Pete A. Zaitcev 1996 Maurizio Plaza 1996 David S. Miller @@ -46,6 +46,7 @@ sys #include "yaboot.h" #include "linux/elf.h" #include "bootinfo.h" +#include "debug.h" #define CONFIG_FILE_NAME "yaboot.conf" #define CONFIG_FILE_MAX 0x8000 /* 32k */ @@ -104,9 +105,7 @@ static void setup_display(void); int useconf = 0; char bootdevice[1024]; -//char *bootpath = NULL; char *password = NULL; -//int bootpartition = -1; struct boot_fspec_t boot; int _machine = _MACH_Pmac; @@ -291,7 +290,7 @@ load_config_file(char *device, char* path, int partition) fspec.part = partition; result = open_file(&fspec, &file); if (result != FILE_ERR_OK) { - prom_printf("%s:%d", fspec.dev, fspec.part); + prom_printf("%s:%d,", fspec.dev, fspec.part); prom_perror(result, fspec.file); prom_printf("Can't open config file\n"); goto bail; @@ -1361,58 +1360,78 @@ setup_display(void) int yaboot_main(void) { - if (_machine == _MACH_Pmac) - setup_display(); - - prom_get_chosen("bootpath", bootdevice, sizeof(bootdevice)); - DEBUG_F("/chosen/bootpath = %s\n", bootdevice); - if (bootdevice[0] == 0) - prom_get_options("boot-device", bootdevice, sizeof(bootdevice)); - if (bootdevice[0] == 0) { - prom_printf("Couldn't determine boot device\n"); - return -1; - } - - if (!parse_device_path(bootdevice, (_machine == _MACH_Pmac) ? "hd" : "disc", - -1, "", &boot)) { - prom_printf("%s: Unable to parse\n", bootdevice); - return -1; - } - DEBUG_F("After parse_device_path: dev=%s, part=%d, file=%s\n", - boot.dev, boot.part, boot.file); + char *ptype; - if (strlen(boot.file)) { - if (!strncmp(boot.file, "\\\\", 2)) - boot.file = "\\\\"; - else { - char *p, *last; - p = last = boot.file; - while(*p) { - if (*p == '\\') - last = p; - p++; - } - if (p) - *(last) = 0; - else - boot.file = ""; - if (strlen(boot.file)) - strcat(boot.file, "\\"); - } - } - DEBUG_F("After path fixup: dev=%s, part=%d, file=%s\n", - boot.dev, boot.part, boot.file); - - useconf = load_config_file(boot.dev, boot.file, boot.part); - - prom_printf("Welcome to yaboot version " VERSION "\n"); - prom_printf("Enter \"help\" to get some basic usage information\n"); + if (_machine == _MACH_Pmac) + setup_display(); - yaboot_text_ui(); + prom_get_chosen("bootpath", bootdevice, sizeof(bootdevice)); + DEBUG_F("/chosen/bootpath = %s\n", bootdevice); + if (bootdevice[0] == 0) + prom_get_options("boot-device", bootdevice, sizeof(bootdevice)); + if (bootdevice[0] == 0) { + prom_printf("Couldn't determine boot device\n"); + return -1; + } + + if (!parse_device_path(bootdevice, (_machine == _MACH_Pmac) ? "hd" : "disc", + -1, "", &boot)) { + prom_printf("%s: Unable to parse\n", bootdevice); + return -1; + } + DEBUG_F("After parse_device_path: dev=%s, part=%d, file=%s\n", + boot.dev, boot.part, boot.file); + + if (strlen(boot.file)) { + if (!strncmp(boot.file, "\\\\", 2)) + boot.file = "\\\\"; + else { + char *p, *last; + p = last = boot.file; + while(*p) { + if (*p == '\\') + last = p; + p++; + } + if (p) + *(last) = 0; + else + boot.file = ""; + if (strlen(boot.file)) + strcat(boot.file, "\\"); + } + } + DEBUG_F("After path fixup: dev=%s, part=%d, file=%s\n", + boot.dev, boot.part, boot.file); + + useconf = load_config_file(boot.dev, boot.file, boot.part); + + prom_printf("Welcome to yaboot version " VERSION "\n"); + prom_printf("Enter \"help\" to get some basic usage information\n"); + + /* I am fed up with lusers using the wrong partition type and + mailing me *when* it breaks */ + + if (_machine == _MACH_Pmac) { + char *entry = cfg_get_strg(0, "ptypewarning"); + int warn = 1; + if (entry) + warn = strcmp(entry, + "I_know_the_partition_type_is_wrong_and_will_NOT_send_mail_when_booting_breaks"); + if (warn) { + ptype = get_part_type(boot.dev, boot.part); + if ((ptype != NULL) && (strcmp(ptype, "Apple_Bootstrap"))) + prom_printf("\nWARNING: Bootstrap partition type is wrong: \"%s\"\n" + " type should be: \"Apple_Bootstrap\"\n\n", ptype); + } + } + + yaboot_text_ui(); - prom_printf("Bye.\n"); - return 0; + prom_printf("Bye.\n"); + return 0; } + /* * Local variables: * c-file-style: "K&R" diff --git a/ybin/ybin b/ybin/ybin index 3da965e..424acc8 100755 --- a/ybin/ybin +++ b/ybin/ybin @@ -28,7 +28,7 @@ if [ -n "$PATH_PREFIX" ] ; then fi PRG="${0##*/}" SIGINT="$PRG: Interrupt caught ... exiting" -VERSION=1.3.4pre2 +VERSION=1.3.4pre3 DEBUG=0 VERBOSE=0 TMP="${TMPDIR:-/tmp}" @@ -1052,7 +1052,7 @@ mnt_install() fi fi - [ "$VERBOSE" = 1 ] && echo "$INSTALLFIRST" + [ "$VERBOSE" = 1 ] && echo "$INSTALLPRIMARY" cp -f "$install" "$TARGET/$BTFILE" if [ $? != 0 ] ; then echo 1>&2 "$PRG: An error occured while writing to $boot" -- 2.39.2