Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2011 17:53:18 GMT
From:      Oleg Ginzburg <olevole@olevole.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/162908: zdump doesn't know progname
Message-ID:  <201111271753.pARHrIvh056762@red.freebsd.org>
Resent-Message-ID: <201111271800.pARI0Krl076362@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         162908
>Category:       misc
>Synopsis:       zdump doesn't know progname
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 27 18:00:20 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Oleg Ginzburg
>Release:        9.0-PRERELEASE
>Organization:
>Environment:
>Description:
The progname variable in zdump(8) is equal null

Something like progname=argv[0] or getprogname(3) missed
>How-To-Repeat:
% zdump -z  

(usage: (null) [--version] [-v] [--help] [-c [loyear,]hiyear] zonename ...)

>Fix:


Patch attached with submission follows:

diff -ruN /usr/src/contrib/tzcode/zic.bak/zdump.c /usr/src/contrib/tzcode/zic/zdump.c
--- /usr/src/contrib/tzcode/zic.bak/zdump.c	2011-11-27 21:42:58.776739066 +0400
+++ /usr/src/contrib/tzcode/zic/zdump.c	2011-11-27 21:43:38.735740140 +0400
@@ -260,6 +260,7 @@
 	register struct tm *	tmp;
 	register struct tm *	newtmp;
 
+	progname=argv[0];
 	INITIALIZE(cutlotime);
 	INITIALIZE(cuthitime);
 #if HAVE_GETTEXT


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111271753.pARHrIvh056762>