diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/mdoc_action.c | 8 |
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) |