Date: Wed, 17 Jan 2001 14:48:30 +0100 From: alex@big.endian.de (Alexander Langer) To: Eric Melville <eric@meow.osd.bsdi.com> Cc: freebsd-hackers@freebsd.org Subject: Re: syslogd patch Message-ID: <20010117144830.A75448@cichlids.cichlids.com> 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 References: <20010116230007.A27043@meow.osd.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010117144830.A75448>