savecore broken because kern.bootfile is set wrong

2000-11-10 Thread John Polstra
Savecore isn't working in -current, dying in my case with "read: invalid argument". (This is on an Alpha -- I don't have an i386 -current machine to test it on at the moment.) I traced it down to the fact that getbootfile() is returning "kernel" -- not the full pathname as the man page promises.

Re: savecore broken because kern.bootfile is set wrong

2000-11-10 Thread Matthew Jacob
> Savecore isn't working in -current, dying in my case with "read: > invalid argument". (This is on an Alpha -- I don't have an i386 > -current machine to test it on at the moment.) I traced it down to > the fact that getbootfile() is returning "kernel" -- not the full > pathname as the man pa

Re: savecore broken because kern.bootfile is set wrong

2000-11-10 Thread John Baldwin
On 11-Nov-00 Matthew Jacob wrote: > > >> Savecore isn't working in -current, dying in my case with "read: >> invalid argument". (This is on an Alpha -- I don't have an i386 >> -current machine to test it on at the moment.) I traced it down to >> the fact that getbootfile() is returning "kerne

Re: savecore broken because kern.bootfile is set wrong

2000-11-10 Thread Matthew Jacob
> > kernel to have the actual path or not. > > It is supposed to. Looks like a bug in the alpha startup code somewhere: > > > uname -a > FreeBSD laptop.baldwin.cx 5.0-CURRENT FreeBSD 5.0-CURRENT #40: Fri Nov 10 > 15:17:48 PST 2000 [EMAIL PROTECTED]:/usr/src/sys/compile/LAPTOP-card > i386

Re: savecore broken because kern.bootfile is set wrong

2000-11-10 Thread Matthew Jacob
> > > kernel to have the actual path or not. > > > > It is supposed to. Looks like a bug in the alpha startup code somewhere: > > > > > uname -a > > FreeBSD laptop.baldwin.cx 5.0-CURRENT FreeBSD 5.0-CURRENT #40: Fri Nov 10 > > 15:17:48 PST 2000 [EMAIL PROTECTED]:/usr/src/sys/compile/LAPTO

Re: savecore broken because kern.bootfile is set wrong

2000-11-10 Thread Mike Smith
> Something actually was changed at some point perhaps? > On i386, kernelname is dug out of bootinfo and copied > (in assembler). > > On alpha: > > p = getenv("kernelname"); > if (p) > strncpy(kernelname, p, sizeof(kernelname) - 1); > > > Did the loader used to

Re: savecore broken because kern.bootfile is set wrong

2000-11-10 Thread Matthew Jacob
Well, things are more broken than I thought. The -current loader for alpha is passing "kernel" in the bootinfo structure- not the full pathname. Loader bug. What's amusing is that kenv does see a full pathname. So, now why did the lines below fail to see the pathname? Hmmm.. ponders -mat

Re: savecore broken because kern.bootfile is set wrong

2000-11-11 Thread Bruce Evans
On Fri, 10 Nov 2000, Matthew Jacob wrote: > Something actually was changed at some point perhaps? > On i386, kernelname is dug out of bootinfo and copied > (in assembler). i386's used to have this bug. This was fixed in: RCS file: /home/ncvs/src/sys/i386/i386/locore.s,v Working file: locore.s

Re: savecore broken because kern.bootfile is set wrong

2000-11-12 Thread Daniel C. Sobral
Matthew Jacob wrote: > > > Also, in "src/sys/boot/common/boot.c" we still have this: > > > > static const char *default_bootfiles = "kernel.ko"; > > > > which isn't right any more. > > Absolutely wrong, yes. > > Look at kern_mib.c: > > > char kernelname[MAXPATHLEN] = "/kernel";/*

Re: savecore broken because kern.bootfile is set wrong

2000-11-12 Thread Daniel C. Sobral
Matthew Jacob wrote: > > Something actually was changed at some point perhaps? > On i386, kernelname is dug out of bootinfo and copied > (in assembler). > > On alpha: > > p = getenv("kernelname"); > if (p) > strncpy(kernelname, p, sizeof(kernelname) - 1); > > >

Re: savecore broken because kern.bootfile is set wrong

2000-11-12 Thread Daniel C. Sobral
Mike Smith wrote: > > > Did the loader used to set kernelname as an environment variable? > > It should still do it. (The forth code handles this) My only Alpha is > running -stable, and $kernelname is set correctly there (see the output > of 'kenv'). Not the forth code. The forth code doesn't

Re: savecore broken because kern.bootfile is set wrong

2000-11-13 Thread Matthew Jacob
> > Though the alpha code (alpha/libalpha/bootinfo.c) also fill in a lot of > stuff in bi, it has no reference at all to "kernelname". Did it ever > work? :-) > Hmm. Maybe not. I'd convinced myself that the loader is currently just passing "kernel" either as an environmental variable or in boo

Re: savecore broken because kern.bootfile is set wrong

2000-11-14 Thread Matthew Jacob
Should be fixed. > Savecore isn't working in -current, dying in my case with "read: > invalid argument". (This is on an Alpha -- I don't have an i386 > -current machine to test it on at the moment.) I traced it down to > the fact that getbootfile() is returning "kernel" -- not the full > path