Subject: CVS commit: src/sbin/route
To: None <source-changes@NetBSD.org>
From: Brian Ginsbach <ginsbach@netbsd.org>
List: source-changes
Date: 08/12/2005 21:23:06
Module Name:	src
Committed By:	ginsbach
Date:		Fri Aug 12 21:23:06 UTC 2005

Modified Files:
	src/sbin/route: route.c

Log Message:
Make sure the get command always exits non-zero on error.  This makes things
like the following work as expected.

#!/bin/sh

if ! route -sn get default >/dev/null 2>&1; then
	echo default gateway not set
	exit 1
fi
echo default gateway set

Handle routing socket write(2) errors when they occur.  This produces
better diagnostics by allowing for handling of the special route errno
values ESRCH, EBUSY, and ENOBUFS even with the quiet (-q) option or
when doing a get command.


To generate a diff of this commit:
cvs rdiff -r1.89 -r1.90 src/sbin/route/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.