Date: Mon, 23 Aug 2004 14:22:37 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: Introducing a poweroff(8) command Message-ID: <XFMail.20040823142237.jdp@polstra.com> In-Reply-To: <200408231141.25077.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 23-Aug-2004 John Baldwin wrote: > On Saturday 21 August 2004 04:22 pm, Giorgos Keramidas wrote: >> Add a hard link to reboot(8) called "poweroff" which defaults to the >> same behavior as "halt -p". Also fix a related bug while here. When >> called as "halt -p" the previous reboot program would not disallow the >> use of -d for saving kernel dumps (it would inhibit dumps without the >> -p option though). >> >> Index: Makefile [...] > I think this is buggy in that p will point to the / character since you don't > modify it in the second case. I.e. what you wrote is basically this: > > p = rindex(*argv, '/'); > if (p != NULL) > p + 1; /* does nothing */ > else > *argv; /* also does nothing */ [...] This whole thread seems ridiculous to me. Why can't it be done with a simple shell script? John
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20040823142237.jdp>