diff options
author | dg <dg@FreeBSD.org> | 1995-06-28 04:42:25 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-06-28 04:42:25 +0000 |
commit | acfe34e6681556d6727d51dea8c63435b487bc79 (patch) | |
tree | 593d448b19dd16856bdf2f00f86f0e0926588832 /sys/i386 | |
parent | 9a6f33d13c1c65fd482f2fdb662d6c64b243e451 (diff) | |
download | FreeBSD-src-acfe34e6681556d6727d51dea8c63435b487bc79.zip FreeBSD-src-acfe34e6681556d6727d51dea8c63435b487bc79.tar.gz |
Make path to kernel absolute if it is passed in relative. This fixes
a related bug in some of the new 'foo'boot bootstrap code that has been
added over the past months. This change makes it no longer necessary
for the bootstrap to fix up the path (i.e. it can be removed).
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/locore.s | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index f088f4c..caf9822 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.51 1995/03/11 03:49:46 phk Exp $ + * $Id: locore.s,v 1.52 1995/04/16 10:12:16 davidg Exp $ */ /* @@ -240,14 +240,20 @@ NON_GPROF_ENTRY(btext) */ movl BI_KERNELNAME(%ebx),%esi cmpl $0,%esi - je 1f /* No kernelname */ - lea _kernelname-KERNBASE,%edi + je 2f /* No kernelname */ movl $MAXPATHLEN,%ecx /* Brute force!!! */ + lea _kernelname-KERNBASE,%edi + cmpb $'/',(%esi) /* Make sure it starts with a slash */ + je 1f + movb $'/',(%edi) + incl %edi + decl %ecx +1: cld rep movsb -1: +2: /* * Determine the size of the boot loader's copy of the bootinfo * struct. This is impossible to do properly because old versions |