summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2006-08-04 21:35:52 +0000
committerBob Beck <beck@cvs.openbsd.org>2006-08-04 21:35:52 +0000
commitea82f6c5f6d4bb51c9e3a60e414082c516d798a7 (patch)
tree21dc95511589dc61ad7b3f8e04e953c190ff6887 /lib
parentd0e695f041fa5614782cde825209fe672aea4826 (diff)
Add ENOMEDIUM and EMEDIUMTYPE to report medium errors to userland programs
when using removable media devices, along with changes to scsi_base to detect such cases in tapes other devices. This makes tar, dd, and friends report a semi useful error message instead of nonsense when there is nothing in the device. Includes libc minor bump, and will require the corresponding sets change. ok krw@ deraadt@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/errlist.c4
-rw-r--r--lib/libc/shlib_version2
-rw-r--r--lib/libc/sys/intro.27
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/libc/gen/errlist.c b/lib/libc/gen/errlist.c
index 59117fff59b..092608c9dba 100644
--- a/lib/libc/gen/errlist.c
+++ b/lib/libc/gen/errlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: errlist.c,v 1.9 2005/08/08 08:05:33 espie Exp $ */
+/* $OpenBSD: errlist.c,v 1.10 2006/08/04 21:35:51 beck Exp $ */
/*
* Copyright (c) 1982, 1985, 1993
* The Regents of the University of California. All rights reserved.
@@ -137,5 +137,7 @@ const char *const
"IPsec processing failure", /* 82 - EIPSEC */
"Attribute not found", /* 83 - ENOATTR */
"Illegal byte sequence", /* 84 - EILSEQ */
+ "No medium found", /* 85 - ENOMEDIUM */
+ "Wrong medium type", /* 86 - EMEDIUMTYPE */
};
int _sys_nerr = { sizeof _sys_errlist/sizeof _sys_errlist[0] };
diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version
index 48b7a8da18c..34130d6b6cb 100644
--- a/lib/libc/shlib_version
+++ b/lib/libc/shlib_version
@@ -1,4 +1,4 @@
major=39
-minor=2
+minor=3
# note: If changes were made to include/thread_private.h or if system
# calls were added/changed then libpthread must also be updated.
diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2
index 36f312177d8..20a08afa780 100644
--- a/lib/libc/sys/intro.2
+++ b/lib/libc/sys/intro.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: intro.2,v 1.36 2006/08/03 23:20:32 jmc Exp $
+.\" $OpenBSD: intro.2,v 1.37 2006/08/04 21:35:51 beck Exp $
.\" $NetBSD: intro.2,v 1.6 1995/02/27 12:33:41 cgd Exp $
.\"
.\" Copyright (c) 1980, 1983, 1986, 1991, 1993
@@ -417,6 +417,11 @@ Not used in
A UFS Extended Attribute is not found for the specified pathname.
.It Er 84 EILSEQ Em "Illegal byte sequence" .
An illegal sequence of bytes was used when using wide characters.
+.It Er 85 ENOMEDIUM Em "No medium found" .
+Attempted to use a removable media device with no medium present.
+.It Er 86 EMEDIUMTYPE Em "Wrong medium type" .
+Attempted to use a removable media device with incorrect or incompatible
+medium.
.El
.Sh DEFINITIONS
.Bl -tag -width Ds