Date: Fri, 12 Jul 2019 06:19:25 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349938 - head/usr.sbin/ppp Message-ID: <201907120619.x6C6JP2f052753@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Jul 12 06:19:25 2019 New Revision: 349938 URL: https://svnweb.freebsd.org/changeset/base/349938 Log: Retire the -DRELEASE_CRUNCH define. The RELEASE_CRUNCH ifdefs save about 100 bytes of text space. The complexity is not worth it as they eliminate error messages. Left the RELEASE_CRUNCH ifdef to eliminate a lot of stuff in place. That saves an interesting amount of space and change some behaviors, so absent a more detailed analysis, maintain the status quo. Modified: head/usr.sbin/ppp/Makefile head/usr.sbin/ppp/bundle.c head/usr.sbin/ppp/physical.c Modified: head/usr.sbin/ppp/Makefile ============================================================================== --- head/usr.sbin/ppp/Makefile Fri Jul 12 05:53:13 2019 (r349937) +++ head/usr.sbin/ppp/Makefile Fri Jul 12 06:19:25 2019 (r349938) @@ -12,7 +12,6 @@ SRCS= acf.c arp.c async.c auth.c bundle.c cbcp.c ccp.c tcpmss.c throughput.c timer.c tty.c tun.c udp.c vjcomp.c WARNS?= 3 .if defined(RELEASE_CRUNCH) -CFLAGS+=-DRELEASE_CRUNCH PPP_NO_DES= PPP_NO_KLDLOAD= PPP_NO_NAT= Modified: head/usr.sbin/ppp/bundle.c ============================================================================== --- head/usr.sbin/ppp/bundle.c Fri Jul 12 05:53:13 2019 (r349937) +++ head/usr.sbin/ppp/bundle.c Fri Jul 12 06:19:25 2019 (r349938) @@ -678,12 +678,9 @@ bundle_LockTun(struct bundle *bundle) if (lockfile != NULL) { fprintf(lockfile, "%d\n", (int)getpid()); fclose(lockfile); - } -#ifndef RELEASE_CRUNCH - else + } else log_Printf(LogERROR, "Warning: Can't create %s: %s\n", pidfile, strerror(errno)); -#endif } static void Modified: head/usr.sbin/ppp/physical.c ============================================================================== --- head/usr.sbin/ppp/physical.c Fri Jul 12 05:53:13 2019 (r349937) +++ head/usr.sbin/ppp/physical.c Fri Jul 12 06:19:25 2019 (r349938) @@ -364,13 +364,9 @@ physical_Close(struct physical *p) if (*p->name.full == '/') { snprintf(fn, sizeof fn, "%s%s.if", _PATH_VARRUN, p->name.base); -#ifndef RELEASE_CRUNCH if (ID0unlink(fn) == -1) log_Printf(LogALERT, "%s: Can't remove %s: %s\n", p->link.name, fn, strerror(errno)); -#else - ID0unlink(fn); -#endif } physical_Unlock(p); if (p->handler && p->handler->destroy) @@ -978,12 +974,9 @@ physical_Found(struct physical *p) if (lockfile != NULL) { fprintf(lockfile, "%s%d\n", TUN_NAME, p->dl->bundle->unit); fclose(lockfile); - } -#ifndef RELEASE_CRUNCH - else + } else log_Printf(LogALERT, "%s: Can't create %s: %s\n", p->link.name, fn, strerror(errno)); -#endif } throughput_start(&p->link.stats.total, "physical throughput",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907120619.x6C6JP2f052753>