From owner-cvs-src@FreeBSD.ORG Sat Oct 27 16:13:33 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0571516A419; Sat, 27 Oct 2007 16:13:33 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D383F13C49D; Sat, 27 Oct 2007 16:13:32 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9RGDVV2023204; Sat, 27 Oct 2007 16:13:31 GMT (envelope-from yar@repoman.freebsd.org) Received: (from yar@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9RGDVHa023203; Sat, 27 Oct 2007 16:13:31 GMT (envelope-from yar) Message-Id: <200710271613.l9RGDVHa023203@repoman.freebsd.org> From: Yar Tikhiy Date: Sat, 27 Oct 2007 16:13:31 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.sbin/crunch/crunchgen crunched_main.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2007 16:13:33 -0000 yar 2007-10-27 16:13:31 UTC FreeBSD src repository Modified files: usr.sbin/crunch/crunchgen crunched_main.c Log: Set the program name if the crunched program is selected through argv[1] to mimic crt0 behaviour. Do the job by a direct assignment to __progname in order to stay compatible with NetBSD, whose setprogname() is a deliberate no-op. The reason for this change is that some programs (usually those imported from NetBSD) use getprogname() to distinguish between their aliases. (See pkill aka pgrep for example.) This change can be useful, and applicable, to NetBSD, too. Revision Changes Path 1.9 +5 -0 src/usr.sbin/crunch/crunchgen/crunched_main.c