From owner-freebsd-hackers Wed Jan 17 5:49:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by hub.freebsd.org (Postfix) with ESMTP id 43B0637B401 for ; Wed, 17 Jan 2001 05:49:07 -0800 (PST) Received: from fwd04.sul.t-online.com by mailout06.sul.t-online.com with smtp id 14IsxS-0008Ld-05; Wed, 17 Jan 2001 14:49:02 +0100 Received: from neutron.cichlids.com (520050424122-0001@[62.225.192.68]) by fmrl04.sul.t-online.com with esmtp id 14IsxH-2FedzkC; Wed, 17 Jan 2001 14:48:51 +0100 Received: from cichlids.cichlids.com (cichlids.cichlids.com [192.168.0.10]) by neutron.cichlids.com (Postfix) with ESMTP id 264BAAB0C; Wed, 17 Jan 2001 14:50:20 +0100 (CET) Received: by cichlids.cichlids.com (Postfix, from userid 1001) id B2CE014BB6; Wed, 17 Jan 2001 14:48:30 +0100 (CET) Date: Wed, 17 Jan 2001 14:48:30 +0100 To: Eric Melville Cc: freebsd-hackers@freebsd.org Subject: Re: syslogd patch Message-ID: <20010117144830.A75448@cichlids.cichlids.com> References: <20010116230007.A27043@meow.osd.bsdi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010116230007.A27043@meow.osd.bsdi.com>; from eric@meow.osd.bsdi.com on Tue, Jan 16, 2001 at 11:00:07PM -0800 X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-PGP-at: finger alex@big.endian.de X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. From: alex@big.endian.de (Alexander Langer) X-Sender: 520050424122-0001@t-dialin.net Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Thus spake Eric Melville (eric@meow.osd.bsdi.com): > Should I send-pr this thing too, or is just sending it to -hackers enough? To -audit, in general. > if (flags & ISKERNEL) { > - snprintf(buf, sizeof(buf), "%s: %s", bootfile, msg); > + /* ignore path to kernel */ > + bflen = strlen(bootfile); > + bfshort = bootfile; > + while(bflen--) > + if(*(bootfile+bflen) == '/') > + { > + bfshort = bootfile+bflen+1; > + break; > + } > + snprintf(buf, sizeof(buf), "%s: %s", bfshort, msg); Why don't you just use basename(3)? Alex -- cat: /home/alex/.sig: No such file or directory To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message