Introducing a poweroff(8) command
John Polstra
jdp at polstra.com
Mon Aug 23 14:22:41 PDT 2004
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
More information about the freebsd-arch
mailing list