From 96f82eabe29d6d4039098d5320b3304acbedf67b Mon Sep 17 00:00:00 2001 From: Ethan Benson Date: Wed, 27 Mar 2002 13:45:22 +0000 Subject: [PATCH 1/1] Commit yaboot 1.3.6-pre2 Commit yaboot 1.3.6-pre2. git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-14 --- ChangeLog | 14 ++++++++++++++ Makefile | 3 ++- TODO | 8 +++++--- changelog | 13 +++++++++---- man/yabootconfig.8 | 3 ++- second/file.c | 21 +++++++++++++-------- second/yaboot.c | 30 +++++++++++++++++++----------- ybin/ybin | 2 +- 8 files changed, 65 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca2a3a7..547d327 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,20 @@ # tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3 # +2002-03-27 13:45:22 GMT Ethan Benson patch-14 + + Summary: + Commit yaboot 1.3.6-pre2 + Revision: + yaboot--devel--1.3--patch-14 + + Commit yaboot 1.3.6-pre2. + + modified files: + ChangeLog Makefile TODO changelog man/yabootconfig.8 + second/file.c second/yaboot.c ybin/ybin + + 2002-03-27 13:37:21 GMT Ethan Benson patch-13 Summary: diff --git a/Makefile b/Makefile index ac1f0b1..5f6221e 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ include Config -VERSION = 1.3.6pre1 +VERSION = 1.3.6pre2 # Debug mode (spam/verbose) DEBUG = 0 # make install vars @@ -138,6 +138,7 @@ bindist: all mkdir -p -m 755 ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot cp -a COPYING ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/COPYING cp -a README ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/README + cp -a doc/README.rs6000 ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/README.rs6000 cp -a doc/yaboot-howto.html ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/yaboot-howto.html cp -a doc/yaboot-howto.sgml ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/yaboot-howto.sgml mv ../yaboot-binary-${VERSION}/etc/yaboot.conf ../yaboot-binary-${VERSION}/usr/local/share/doc/yaboot/ diff --git a/TODO b/TODO index 1f609b2..871b293 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,8 @@ * Interactive shell mode for yaboot, similar to the grub shell. * Add nvram updating support for IBM hardware. This requires ofpath - to support these machines. It also requires a compatible nvsetenv - or equivilent. + to support these machines (ofpath done, or mostly so). It also + requires a compatible nvsetenv or equivilent. * Validate yaboot options before proceeding. (need better config parsing) @@ -14,4 +14,6 @@ * Figure out all the crap with CHRP netbooting, probably have to remove hard-coding of ":0" after a net device path (done as of 1.3.4?) -* Support for compressed images +* JFS support. + +* Support for compressed images (this will probably be solved in the kernel) diff --git a/changelog b/changelog index 95f14e7..16f0ea4 100644 --- a/changelog +++ b/changelog @@ -1,11 +1,14 @@ -2001-11-21 Ethan Benson +2001-11-29 Ethan Benson - * Version 1.3.6pre1 + * Version 1.3.6pre2 * The "IBM needs to test prereleases" release. - * New IGNORE^H^H^H^H^H^HREADME, thanks to Chris Tillman for - cleaning up the pile of cruft that this thing was. + * Documentation: + - New IGNORE^H^H^H^H^H^HREADME, thanks to Chris Tillman for + cleaning up the pile of cruft that this thing was. + - yabootconfig man page was missing --kernel-args from SYSOPSIS. + - include README.rs6000 in the binary dist. * ybin: - Automatically use fstype=raw on IBM CHRP, it no longer needs @@ -18,6 +21,8 @@ but not including a filename. - Fix IBM CHRP support. - Add support for zImage.initrd (Peter Bergner). + - help output no longer claims device=NULL if yaboot.conf does not define it. + - Make password prompting a bit nicer looking. 2001-10-28 Ethan Benson diff --git a/man/yabootconfig.8 b/man/yabootconfig.8 index 9c03bd0..ab0b88d 100644 --- a/man/yabootconfig.8 +++ b/man/yabootconfig.8 @@ -17,7 +17,7 @@ .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" -.TH YABOOTCONFIG 8 "25 September 2001" "GNU/Linux PowerPC" "System Manager's Manual" +.TH YABOOTCONFIG 8 "24 November 2001" "GNU/Linux PowerPC" "System Manager's Manual" .SH NAME .B yabootconfig \- generates a simple /etc/yaboot.conf @@ -26,6 +26,7 @@ .RB [ \ \-t | \-\-chroot\ \\fIdirectory\ ] .RB [ \ \-b | \-\-boot\ \fIdevice\ ] .RB [ \ \-r | \-\-root\ \fIdevice\ ] +.RB [ \ \-\-kernel-args\ \\fI"kernel_args"\ ] .RB [ \ \-q | \-\-quiet\ ] .RB [ \ \-\-noinstall\ ] .RB [ \ \-\-debug\ ] diff --git a/second/file.c b/second/file.c index b887069..366d5ba 100644 --- a/second/file.c +++ b/second/file.c @@ -83,14 +83,19 @@ parse_device_path(char *imagepath, char *defdevice, int defpart, } } - if ((ptr = strrchr(ipath, ',')) != NULL) { - char *colon = strrchr(ipath, ':'); - /* If a ':' occurs *after* a ',', then we assume that there is - no filename */ - if (!colon || colon < ptr) { - result->file = strdup(ptr+1); - /* Trim the filename off */ - *ptr = 0; + /* if there is no : then there is no filename or partition. must + use strrchr() since enet:,10.0.0.1,file is legal */ + + if (strchr(ipath, ':') != NULL) { + if ((ptr = strrchr(ipath, ',')) != NULL) { + char *colon = strrchr(ipath, ':'); + /* If a ':' occurs *after* a ',', then we assume that there is + no filename */ + if (!colon || colon < ptr) { + result->file = strdup(ptr+1); + /* Trim the filename off */ + *ptr = 0; + } } } diff --git a/second/yaboot.c b/second/yaboot.c index 7b7bcdb..a061275 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -542,8 +542,9 @@ void check_password(char *str) { int i; + prom_printf("\n%s", str); for (i = 0; i < 3; i++) { - prom_printf ("\n%sassword: ", str); + prom_printf ("\nPassword: "); passwdbuff[0] = 0; cmdedit ((void (*)(void)) 0, 1); prom_printf ("\n"); @@ -558,11 +559,15 @@ void check_password(char *str) if (!strcmp (password, passwdbuff)) return; #endif /* USE_MD5_PASSWORDS */ - if (i < 2) - prom_printf ("Password incorrect. Please try again..."); + if (i < 2) { + prom_sleep(1); + prom_printf ("Incorrect password. Try again."); + } } - prom_printf ("Seems like you don't know the access password. Go away!\n"); - prom_sleep(3); + prom_printf(" ___________________\n< Permission denied >\n -------------------\n" + " \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n" + " ||----w |\n || ||\n"); + prom_sleep(4); prom_interpret("reset-all"); } @@ -694,15 +699,18 @@ int get_params(struct boot_param_t* params) restricted = 1; if (label) { if (params->args && password && restricted) - check_password ("To specify image arguments you must enter the p"); + check_password ("To specify arguments for this image " + "you must enter the password."); else if (password && !restricted) - check_password ("P"); + check_password ("This image is restricted."); } params->args = make_params(label, params->args); } } if (!strcmp (imagename, "help")) { + /* FIXME: defdevice shouldn't need to be reset all over the place */ + if(!defdevice) defdevice = boot.dev; prom_printf( "\nPress the tab key for a list of defined images.\n" "The label marked with a \"*\" is is the default image, " @@ -723,13 +731,13 @@ int get_params(struct boot_param_t* params) if (!strcmp (imagename, "halt")) { if (password) - check_password ("P"); + check_password ("Restricted command."); prom_pause(); return 0; } if (!strcmp (imagename, "bye")) { if (password) { - check_password ("P"); + check_password ("Restricted command."); return 1; } return 1; @@ -738,7 +746,7 @@ int get_params(struct boot_param_t* params) if (imagename[0] == '$') { /* forth command string */ if (password) - check_password ("P"); + check_password ("OpenFirmware commands are restricted."); prom_interpret(imagename+1); return 0; } @@ -746,7 +754,7 @@ int get_params(struct boot_param_t* params) strncpy(imagepath, imagename, 1024); if (!label && password) - check_password ("To boot a custom image you must enter the p"); + check_password ("To boot a custom image you must enter the password."); if (!parse_device_path(imagepath, defdevice, defpart, "/vmlinux", ¶ms->kernel)) { diff --git a/ybin/ybin b/ybin/ybin index ebb6e16..a479bb5 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.6pre1 +VERSION=1.3.6pre2 DEBUG=0 VERBOSE=0 TMP="${TMPDIR:-/tmp}" -- 2.39.2