FreeBSD Bugzilla – Attachment 90122 Details for
Bug 127220
[patch] err(3) suggests using exit values from sysexits(3) but examples don't
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 942 bytes, created by
Rebecca Cran
on 2008-09-08 21:00:11 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Rebecca Cran
Created:
2008-09-08 21:00:11 UTC
Size:
942 bytes
patch
obsolete
>--- /usr/src/lib/libc/gen/err.3 2007-01-09 00:27:53.000000000 +0000 >+++ err.3 2008-09-08 20:54:20.000000000 +0100 >@@ -178,15 +178,15 @@ > Display the current errno information string and exit: > .Bd -literal -offset indent > if ((p = malloc(size)) == NULL) >- err(1, NULL); >+ err(EX_OSERR, NULL); > if ((fd = open(file_name, O_RDONLY, 0)) == -1) >- err(1, "%s", file_name); >+ err(EX_NOINPUT, "%s", file_name); > .Ed > .Pp > Display an error message and exit: > .Bd -literal -offset indent > if (tm.tm_hour < START_TIME) >- errx(1, "too early, wait until %s", start_time_string); >+ errx(EX_DATAERR, "too early, wait until %s", start_time_string); > .Ed > .Pp > Warn of an error: >@@ -195,7 +195,7 @@ > warnx("%s: %s: trying the block device", > raw_device, strerror(errno)); > if ((fd = open(block_device, O_RDONLY, 0)) == -1) >- err(1, "%s", block_device); >+ err(EX_OSFILE, "%s", block_device); > .Ed > .Pp > Warn of an error without using the global variable
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 127220
: 90122