From owner-cvs-src@FreeBSD.ORG Sat Mar 29 13:43:38 2008 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 3AF611065674; Sat, 29 Mar 2008 13:43:38 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0D2508FC15; Sat, 29 Mar 2008 13:43:38 +0000 (UTC) (envelope-from remko@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 m2TDhbMJ041106; Sat, 29 Mar 2008 13:43:37 GMT (envelope-from remko@repoman.freebsd.org) Received: (from remko@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2TDhbCC041105; Sat, 29 Mar 2008 13:43:37 GMT (envelope-from remko) Message-Id: <200803291343.m2TDhbCC041105@repoman.freebsd.org> From: Remko Lodder Date: Sat, 29 Mar 2008 13:43:37 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_7 Cc: Subject: cvs commit: src/sbin/route route.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, 29 Mar 2008 13:43:38 -0000 remko 2008-03-29 13:43:37 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sbin/route route.c Log: MFC rev 1.84 route.c In route.c in newroute() there's a call to exit(0) if the command was 'get'. Since rtmsg() always gets called and returns 0 on success and -1 on failure, it's possible to exit with a suitable exit code by calling exit(ret != 0) instead, as is done at the end of newroute(). PR: bin/112303 Submitted by: bruce@cran.org.uk MFC after: 1 week Approved by: imp (mentor, implicit) Revision Changes Path 1.81.2.2 +1 -1 src/sbin/route/route.c