Subject: Re: bin/32596: last(1): -n flag does'nt work.
To: None <gnats-bugs@netbsd.org, gnats-admin@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 01/22/2006 10:44:27
On Jan 22,  1:20pm, claudio@netcat.it (claudio@netcat.it) wrote:
-- Subject: bin/32596: last(1): -n flag does'nt work.

| >Number:         32596
| >Category:       bin
| >Synopsis:       last(1): -n flag does'nt work.
| >Confidential:   no
| >Severity:       non-critical
| >Priority:       low
| >Responsible:    bin-bug-people
| >State:          open
| >Class:          sw-bug
| >Submitter-Id:   net
| >Arrival-Date:   Sun Jan 22 13:20:00 +0000 2006
| >Originator:     ilfoglionascosto@netcat.it
| >Release:        NetBSD 3.99.15 (Fri Jan 13 22:16:21 CET 2006)
| >Organization:
| >Environment:
| 	
| 	
| System: NetBSD clabsd.org 3.99.15 NetBSD 3.99.15 (CURRENT) #11: Fri Jan 13 22:16:21 CET 2006 claudio@clabsd.org:/usr/obj/sys/arch/i386/compile/CURRENT i386
| 
| Architecture: i386
| Machine: i386
| >Description:
| 	Executing last(1) with "-narg" (without space between '-n' and 'arg' 
| 	it crash (as follow) and create a core dump.
| 
| 	$ last -n9 ; ls -l last.core
| 	Memory fault (core dumped) 
| 	-rw-------  1 claudio  users  74728 Jan 22 14:14 last.core
| 
| 	Using the flash in the "correct" mode these are the results:
| 
| 	$ last -n 9 
| 
| 	wtmpx begins Tue Jan 17 2006 14:33:22
| 
| 	Probably '-n' should be removed in favour of -NUMBER flag.
| 
| 
| >How-To-Repeat:
|         Run last with "-nflag" .
| >Fix:

It works, but -# needs to be specified separately as shown in the man
page. I fixed it so that it does not core-dump.

christos