summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-07-06 21:40:31 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-07-06 21:40:31 +0000
commit4bae8c8ad0bed6c74c6a29c6b5bd0f1e60b191e4 (patch)
tree8f7ed2dd82acd4e1b03e66e97bf7e42eca270320 /usr.bin
parent4e82919d45c47e6e3df31f726096b84f1a458ef4 (diff)
sync to 1.7.21: convert the last plain mdoc_err() in this file to verr();
this is still not really good, but can stay like this for now
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/mdoc_action.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_action.c b/usr.bin/mandoc/mdoc_action.c
index 07bf691135d..a8856679aaa 100644
--- a/usr.bin/mandoc/mdoc_action.c
+++ b/usr.bin/mandoc/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.9 2009/06/27 12:43:11 schwarze Exp $ */
+/* $Id: mdoc_action.c,v 1.10 2009/07/06 21:40:30 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -33,6 +33,7 @@ enum mwarn {
enum merr {
ETOOLONG,
EMALLOC,
+ EUTSNAME,
ENUMFMT
};
@@ -267,6 +268,9 @@ perr(struct mdoc *m, int line, int pos, enum merr type)
case (ETOOLONG):
p = "argument text too long";
break;
+ case (EUTSNAME):
+ p = "utsname";
+ break;
case (EMALLOC):
p = "memory exhausted";
break;
@@ -500,7 +504,7 @@ post_os(POST_ARGS)
if (0 == buf[0]) {
if (-1 == uname(&utsname))
- return(mdoc_err(m, "utsname"));
+ return(verr(m, EUTSNAME));
if (strlcat(buf, utsname.sysname, 64) >= 64)
return(verr(m, ETOOLONG));
if (strlcat(buf, " ", 64) >= 64)