Commit Graph

128 Commits

Author SHA1 Message Date
mckusick
72a21ba0f6 Create new EINTEGRITY error with message "Integrity check failed".
An integrity check such as a check-hash or a cross-correlation failed.
The integrity error falls between EINVAL that identifies errors in
parameters to a system call and EIO that identifies errors with the
underlying storage media. EINTEGRITY is typically raised by intermediate
kernel layers such as a filesystem or an in-kernel GEOM subsystem when
they detect inconsistencies. Uses include allowing the mount(8) command
to return a different exit value to automate the running of fsck(8)
during a system boot.

These changes make no use of the new error, they just add it. Later
commits will be made for the use of the new error number and it will
be added to additional manual pages as appropriate.

Reviewed by:    gnn, dim, brueffer, imp
Discussed with: kib, cem, emaste, ed, jilles
Differential Revision: https://reviews.freebsd.org/D18765
2019-01-17 06:35:45 +00:00
ache
dfc56ae9ae Use current locale (f.e. set by thread). It was global locale always
previously.

MFC after:      7 days
2016-08-24 16:44:27 +00:00
bdrewery
27e083b53b Move logic to destroy a struct catentry to its own function.
This will be used later for memory leak handling.

Obtained from:	OneFS
Sponsored by:	EMC / Isilon Storage Division
2016-02-02 23:33:58 +00:00
bapt
2b78b18c21 Use mdoc(7) macros to handle parenthesis 2015-04-26 10:54:52 +00:00
bdrewery
ff61e3f5d6 When catopen(3) returns an error, it caches the result of that error
from r202992. The refcount on the cache entry is not initialized, so
any attempt to clean the cache will skip over this item since it likely
has a >0 value.

This change is currently a NOP. There is work in progress to support
freeing the cache which requires this change to avoid a memory leak.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-02-10 20:45:40 +00:00
marcel
99c9726a00 Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}
if not already defined. This allows building libc from outside of
lib/libc using a reach-over makefile.

A typical use-case is to build a standard ILP32 version and a COMPAT32
version in a single iteration by building the COMPAT32 version using a
reach-over makefile.

Obtained from:	Juniper Networks, Inc.
2014-03-04 02:19:39 +00:00
pluknet
bf7b6b6227 POSIX 1003.1-2008: add ENOTRECOVERABLE, EOWNERDEAD errnos. 2013-05-04 19:07:22 +00:00
pluknet
17f70d0a20 Add entry for errno ECAPMODE.
MFC after:	3 days
2013-05-04 12:57:21 +00:00
jilles
f98571cfa0 libc: Fix typo in French translation.
PR:		kern/177704
Submitted by:	martymac
MFC after:	1 week
2013-04-14 11:44:47 +00:00
delphij
ab5f5cd77f Add derived versions for common Simplified Chinese encodings.
MFC after:	2 weeks
2012-12-28 01:23:12 +00:00
delphij
b179cbf13b Add zh_CN.UTF-8 catalog.
Reviewed by:	alphachi <alphachi mediaspirit.org>
MFC after:	2 weeks
2012-12-28 01:09:30 +00:00
eadler
1c3512cb76 Fix warning from valgrind when a failed entry is tested.
PR:		kern/173008
Submitted by:	Zhihao Yuan <lichray@gmail.com>
Reviewed by:	gabor
Approved by:	cperciva (implicit)
MFC after:	1 week
2012-12-17 12:57:36 +00:00
jilles
fba61ef227 libc: Use O_CLOEXEC for various internal file descriptors.
This fixes a race condition where another thread may fork() before CLOEXEC
is set, unintentionally passing the descriptor to the child process.

This commit only adds O_CLOEXEC flags to open() or openat() calls where no
fcntl(fd, F_SETFD, FD_CLOEXEC) follows. The separate fcntl() call still
leaves a race window so it should be fixed later.
2012-09-29 11:54:34 +00:00
maxim
a1cc78e5a1 Merge from English r198040: add C message catalogue entries for newer
errnos: EBADMSG, EMULTIHOP, ENOLINK, EPROTO, ENOTCAPABLE.

PR:		docs/147983
Submitted by:	pluknet
MFC after:	1 week
2010-06-20 06:52:10 +00:00
gabor
ea21a95532 - More style(9) fixups
Approved by:	delphij (mentor)
2010-02-20 08:19:19 +00:00
gabor
4081d06fa6 - Deal with some special cases [1]
- style(9) nits

Pointed out by:	jilles [1]
Approved by:	delphij (mentor)
2010-02-09 19:37:12 +00:00
gabor
e93ffcfe03 - Fix some style(9) bugs
Pointed out by:	bde
2010-01-29 18:33:59 +00:00
gabor
5cd5dea33b - style(9)
Approved by:	delphij
2010-01-25 23:44:00 +00:00
gabor
b9c96fa735 Cache failing and opened catalogs in catopen() and related functions.
Continuous catopen() calls cause 4 failig stat(2) each, which means a lot
of overhead.  It is also a good idea to keep the opened catalogs in the memory
to speed up further catopen() calls to the same catalog since these catalogs
are not big at all.  In this case, we count references and only free() the
allocated space when the reference count reaches 0.  The reads and writes to
the cache are syncronized with an rwlock when these functions are called from
a threaded program.

Requested by:	kib
Approved by:	delphij
2010-01-25 23:37:49 +00:00
gabor
64eeb2f5c8 - Update Galician catalog 2010-01-21 11:36:40 +00:00
gabor
786e403e1b - Update the Spanish NLS catalog
Reviewed by:	carvay,
		the.infamous.paul@gmail.com,
		Joan Picanyol i Puig <lists-freebsd-es@biaix.org>,
		Ing . Marcos Luis Ortiz Valmaseda <mlortiz@uci.cu>,
		eskanete@gmail.com,
		Jose M Rodriguez <josemi@freebsd.jazztel.es>,
		Guillermo Hernandez <guillermo@QuerySoft.es>,
		dani.doni@gmail.com
2009-12-03 19:27:12 +00:00
gabor
3bc020a691 - Update Hungarian libc catalog 2009-11-17 18:57:44 +00:00
jkim
0730701018 Sync with C.msg r199083. 2009-11-16 19:10:09 +00:00
rene
8ecd96b1ed Synchronize with C.msg revision 199083 and improve some existing messages.
Reviewed by:	remko
Approved by:	remko
2009-11-11 18:28:12 +00:00
ume
700ad53160 Add Japanese catalogue entries for newer errnos: EBADMSG, EMULTIHOP,
ENOLINK, EPROTO, ENOTCAPABLE.
2009-11-10 03:56:51 +00:00
ume
d70e2a3aeb Add gai_strerror() catalog for ja_JP.UTF-8 and ja_JP.eucJP. 2009-11-09 17:26:16 +00:00
ume
a9dc4dbb62 Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.
2009-11-09 12:46:59 +00:00
ume
916f88dc5a Fix comment.
Pointed out by:	nyan
MFC after:	1 week
2009-11-09 12:38:13 +00:00
ume
2a01fbc911 Add ja_JP.eucJP catalog.
Reviewed by:	hrs, nork, takawata
MFC after:	1 week
2009-11-09 12:33:47 +00:00
ume
666d1e7afa Add ja_JP.UTF-8 catalog.
Reviewed by:	hrs, nork, takawata
MFC after:	1 week
2009-11-09 12:28:59 +00:00
gabor
4968e1f708 - Strip trailing CRs
Requested by:	Alex Kozlov <spam@rm-rf.kiev.ua> (via private mail)
2009-11-08 11:55:03 +00:00
gabor
5f89352d0d - Update Ukranian catalog
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua> (via private mail)
2009-11-08 11:32:39 +00:00
rwatson
1e0040cfb5 Add C message catalogue entries for newer errnos: EBADMSG, EMULTIHOP,
ENOLINK, EPROTO, ENOTCAPABLE.

Submitted by:	Alan R. S. Bueno <alan.bsd at gmail.com>
MFC after:	3 days (most)
2009-10-13 17:57:06 +00:00
gabor
1856a0cdd6 - Add Galician NLS catalog 2009-09-27 13:16:38 +00:00
netchild
6273335e54 Improve the German translation.
Some parts (ERANGE, ETXTBSY) triggered by Christoph Mallon.

Discussed with:	brueffer, gabor (previous version)
2009-03-25 12:36:37 +00:00
gabor
6e4ec9f54d - Add Belarusian catalog
PR:		conf/133004
Submitted by:	Tatsiana Elavaya <t.elavaya@gmail.com>
2009-03-24 23:31:41 +00:00
maxim
8215a8427b o Spell. 2009-03-21 10:10:33 +00:00
gabor
930d8468b2 - Add Ukranian catalog
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua> (via private mail)
2009-03-20 23:55:01 +00:00
gabor
79d9ed6723 - Fix typo
PR:		kern/132773
Reported by:	Alan R. S. Bueno <alan.bsd@gmail.com>
Submitted by:	Murilo Opsfelder <mopsfelder@gmail.com>
2009-03-18 14:33:10 +00:00
gabor
cd56ced92d - Add Brazilian Portuguese catalog [1]
- Fixes for German catalog [2]

PR:		kern/132694 [1], conf/80504 [2]
Submitted by:	Murilo Opsfelder <mopsfelder@gmail.com> [1],
		brueffer [2]
2009-03-16 16:33:08 +00:00
gabor
0592710988 - Create the buildworld object directories with mtree instead of various
mkdir calls
- Remove the ugly workaroung from libc NLS, which was to create some of
  these directories
2009-03-15 13:14:06 +00:00
gabor
2bf7071f66 - Fix object directory creation when running threaded buildworld 2009-03-13 22:41:30 +00:00
gabor
a9bdc02cf2 - Reenable Native Language Support in libc. This feature was disabled due
to possible breakages in the catalog handling code.  Since then, that
  code has been replaced by the secure code from NetBSD but NLS in libc
  remained turned off.  Tests have shown that the feature is stable and
  working so we can now turn it on again.

- Add several new catalog files:
  - ca_ES.ISO8859-1
  - de_DE.ISO8859-1
  - el_GR.ISO8859-7  (by manolis@ and keramida@)
  - es_ES.ISO8859-1  (kern/123179, by carvay@)
  - fi_FI.ISO8859-1
  - fr_FR.ISO8859-1  (kern/78756, by thierry@)
  - hu_HU.ISO8859-2  (by gabor@)
  - it_IT.ISO8859-15
  - nl_NL.ISO8859-1  (corrections by rene@)
  - no_NO.ISO8859-1
  - mn_MN.UTF-8      (by ganbold@)
  - sk_SK.ISO8859-2
  - sv_SE.ISO8859-1
  (The catalogs without explicit source has been obtained from NetBSD.)

Approved by:	attilio
2009-03-13 10:40:38 +00:00
deischen
2a7306fdc5 Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
deischen
a0f6b0f1d0 Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
deischen
138dd54357 Add symbol maps and initial symbol version definitions to libc.
Reviewed by:	davidxu
2006-03-13 00:53:21 +00:00
pjd
ff28179518 Better translation. 2005-07-23 21:30:35 +00:00
jkim
3ceb159fcb Use better Korean translation for `trap'
Requested by:	many Korean users from bsdforum.or.kr
Submitted by:	perky
Approved by:	anholt (mentor)
2005-07-16 05:40:14 +00:00
ru
38fc91ca96 Assorted markup fixes.
Approved by:	re
2005-06-15 19:04:04 +00:00
phantom
732dfa42c4 Add korean NLS message catalogs for libc
Submitted by:	Hye-Shik Chang <perky@FreeBSD.org>
PR:		misc/78290
2005-03-07 13:57:24 +00:00