Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Refactor the numeric validity check just added, so ...
details: https://anonhg.NetBSD.org/src/rev/077925e8f2e9
branches: trunk
changeset: 365656:077925e8f2e9
user: kre <kre%NetBSD.org@localhost>
date: Sun Aug 26 11:53:28 2018 +0000
description:
Refactor the numeric validity check just added, so the error
messages can be (easily) done better.
diffstat:
sys/kern/makesyscalls.sh | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r e7b718ef10c2 -r 077925e8f2e9 sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh Sun Aug 26 11:48:00 2018 +0000
+++ b/sys/kern/makesyscalls.sh Sun Aug 26 11:53:28 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makesyscalls.sh,v 1.171 2018/08/26 11:48:00 kre Exp $
+# $NetBSD: makesyscalls.sh,v 1.172 2018/08/26 11:53:28 kre Exp $
#
# Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
# All rights reserved.
@@ -78,12 +78,18 @@
*) . ./$1;;
esac
+errmsg()
+{
+ fail=true;
+ printf '%s: %s\n' "$0" "$*" >&2
+}
+
fail=false
case "${nsysent:-0}" in
-*[!0-9]*) fail=true; printf >&2 '%s\n' "Non numeric value for nsysent";;
+*[!0-9]*) errmsg "Non numeric value for nsysent:" "${nsysent}";;
esac
case "${maxsysargs:-0}" in
-*[!0-9]*) fail=true; printf >&2 '%s\n' "Non numeric value for maxsysargs";;
+*[!0-9]*) errmsg "Non numeric value for maxsysargs:" "${maxsysargs}";;
esac
$fail && exit 1
Home |
Main Index |
Thread Index |
Old Index