Index: lib/libc/sys/access.2 =================================================================== --- lib/libc/sys/access.2 +++ lib/libc/sys/access.2 @@ -175,6 +175,8 @@ points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp Also, the Index: lib/libc/sys/acct.2 =================================================================== --- lib/libc/sys/acct.2 +++ lib/libc/sys/acct.2 @@ -119,6 +119,8 @@ points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr acct 5 , Index: lib/libc/sys/bind.2 =================================================================== --- lib/libc/sys/bind.2 +++ lib/libc/sys/bind.2 @@ -122,6 +122,8 @@ Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The name would reside on a read-only file system. .It Bq Er EISDIR Index: lib/libc/sys/chdir.2 =================================================================== --- lib/libc/sys/chdir.2 +++ lib/libc/sys/chdir.2 @@ -96,6 +96,8 @@ points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The Index: lib/libc/sys/chflags.2 =================================================================== --- lib/libc/sys/chflags.2 +++ lib/libc/sys/chflags.2 @@ -264,6 +264,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOPNOTSUPP The underlying file system does not support file flags, or does not support all of the flags set in @@ -306,6 +308,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOPNOTSUPP The underlying file system does not support file flags, or does not support all of the flags set in Index: lib/libc/sys/chmod.2 =================================================================== --- lib/libc/sys/chmod.2 +++ lib/libc/sys/chmod.2 @@ -244,6 +244,8 @@ points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFTYPE The effective user ID is not the super-user, the mode includes the sticky bit .Dv ( S_ISVTX ) , @@ -265,6 +267,8 @@ The file resides on a read-only file system. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition to the Index: lib/libc/sys/chown.2 =================================================================== --- lib/libc/sys/chown.2 +++ lib/libc/sys/chown.2 @@ -183,6 +183,8 @@ points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -205,6 +207,8 @@ The named file resides on a read-only file system. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition to the errors specified for Index: lib/libc/sys/chroot.2 =================================================================== --- lib/libc/sys/chroot.2 +++ lib/libc/sys/chroot.2 @@ -121,6 +121,8 @@ points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr chdir 2 , Index: lib/libc/sys/copy_file_range.2 =================================================================== --- lib/libc/sys/copy_file_range.2 +++ lib/libc/sys/copy_file_range.2 @@ -180,6 +180,8 @@ is not zero. .It Bq Er EIO An I/O error occurred while reading/writing the files. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from a file system. .It Bq Er EISDIR If either .Fa infd Index: lib/libc/sys/execve.2 =================================================================== --- lib/libc/sys/execve.2 +++ lib/libc/sys/execve.2 @@ -304,6 +304,8 @@ to an illegal address. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp In addition, the Index: lib/libc/sys/fhlink.2 =================================================================== --- lib/libc/sys/fhlink.2 +++ lib/libc/sys/fhlink.2 @@ -219,6 +219,8 @@ .It Bq Er EIO An I/O error occurred while reading from or writing to the file system to make the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. Index: lib/libc/sys/fhreadlink.2 =================================================================== --- lib/libc/sys/fhreadlink.2 +++ lib/libc/sys/fhreadlink.2 @@ -76,6 +76,8 @@ The named file is not a symbolic link. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa buf Index: lib/libc/sys/fsync.2 =================================================================== --- lib/libc/sys/fsync.2 +++ lib/libc/sys/fsync.2 @@ -107,6 +107,8 @@ refers to a socket, not to a file. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr fsync 1 , Index: lib/libc/sys/getdirentries.2 =================================================================== --- lib/libc/sys/getdirentries.2 +++ lib/libc/sys/getdirentries.2 @@ -189,6 +189,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr lseek 2 , Index: lib/libc/sys/getfh.2 =================================================================== --- lib/libc/sys/getfh.2 +++ lib/libc/sys/getfh.2 @@ -192,6 +192,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ESTALE The file handle .Fa fhp Index: lib/libc/sys/getfsstat.2 =================================================================== --- lib/libc/sys/getfsstat.2 +++ lib/libc/sys/getfsstat.2 @@ -118,6 +118,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr statfs 2 , Index: lib/libc/sys/ktrace.2 =================================================================== --- lib/libc/sys/ktrace.2 +++ lib/libc/sys/ktrace.2 @@ -177,6 +177,8 @@ Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENOSYS The kernel was not compiled with .Nm Index: lib/libc/sys/link.2 =================================================================== --- lib/libc/sys/link.2 +++ lib/libc/sys/link.2 @@ -222,6 +222,8 @@ .It Bq Er EIO An I/O error occurred while reading from or writing to the file system to make the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. Index: lib/libc/sys/mkdir.2 =================================================================== --- lib/libc/sys/mkdir.2 +++ lib/libc/sys/mkdir.2 @@ -126,6 +126,8 @@ An I/O error occurred while making the directory entry or allocating the inode. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path Index: lib/libc/sys/mkfifo.2 =================================================================== --- lib/libc/sys/mkfifo.2 +++ lib/libc/sys/mkfifo.2 @@ -134,6 +134,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path Index: lib/libc/sys/mknod.2 =================================================================== --- lib/libc/sys/mknod.2 +++ lib/libc/sys/mknod.2 @@ -108,6 +108,8 @@ The process's effective user ID is not super-user. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENOSPC The directory in which the entry for the new node is being placed cannot be extended because there is no space left on the file Index: lib/libc/sys/mount.2 =================================================================== --- lib/libc/sys/mount.2 +++ lib/libc/sys/mount.2 @@ -274,6 +274,13 @@ .Fa dir argument points outside the process's allocated address space. +.It Bq Er EIO +An I/O error occurred while reading data from +.Fa special . +.It Bq Er EINTEGRITY +The backing store for +.Fa special +detected corrupted data while reading. .El .Pp The following errors can occur for a Index: lib/libc/sys/open.2 =================================================================== --- lib/libc/sys/open.2 +++ lib/libc/sys/open.2 @@ -510,6 +510,8 @@ An I/O error occurred while making the directory entry or allocating the inode for .Dv O_CREAT . +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ETXTBSY The file is a pure procedure (shared text) file that is being executed and the Index: lib/libc/sys/pathconf.2 =================================================================== --- lib/libc/sys/pathconf.2 +++ lib/libc/sys/pathconf.2 @@ -230,6 +230,8 @@ Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -244,6 +246,8 @@ is not a valid open file descriptor. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr lseek 2 , Index: lib/libc/sys/posix_fadvise.2 =================================================================== --- lib/libc/sys/posix_fadvise.2 +++ lib/libc/sys/posix_fadvise.2 @@ -124,6 +124,10 @@ The .Fa fd argument is associated with a pipe or FIFO. +.It Bq Er EIO +An I/O error occurred while reading from or writing to a file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr madvise 2 Index: lib/libc/sys/posix_fallocate.2 =================================================================== --- lib/libc/sys/posix_fallocate.2 +++ lib/libc/sys/posix_fallocate.2 @@ -112,6 +112,8 @@ or the operation is not supported by the file system. .It Bq Er EIO An I/O error occurred while reading from or writing to a file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ENODEV The .Fa fd Index: lib/libc/sys/quotactl.2 =================================================================== --- lib/libc/sys/quotactl.2 +++ lib/libc/sys/quotactl.2 @@ -228,6 +228,8 @@ .Tn I/O error occurred while reading from or writing to a file containing quotas. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT An invalid .Fa addr Index: lib/libc/sys/read.2 =================================================================== --- lib/libc/sys/read.2 +++ lib/libc/sys/read.2 @@ -182,6 +182,8 @@ points outside the allocated address space. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EBUSY Failed to read from a file, e.g. /proc//regs while is not stopped .It Bq Er EINTR Index: lib/libc/sys/readlink.2 =================================================================== --- lib/libc/sys/readlink.2 +++ lib/libc/sys/readlink.2 @@ -108,6 +108,8 @@ The named file is not a symbolic link. .It Bq Er EIO An I/O error occurred while reading from the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa buf Index: lib/libc/sys/rename.2 =================================================================== --- lib/libc/sys/rename.2 +++ lib/libc/sys/rename.2 @@ -240,6 +240,8 @@ containing the directory has been exhausted. .It Bq Er EIO An I/O error occurred while making or updating a directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The requested link requires writing in a directory on a read-only file system. Index: lib/libc/sys/rmdir.2 =================================================================== --- lib/libc/sys/rmdir.2 +++ lib/libc/sys/rmdir.2 @@ -100,6 +100,8 @@ .It Bq Er EIO An I/O error occurred while deleting the directory entry or deallocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The directory entry to be removed resides on a read-only file system. .It Bq Er EFAULT Index: lib/libc/sys/sendfile.2 =================================================================== --- lib/libc/sys/sendfile.2 +++ lib/libc/sys/sendfile.2 @@ -351,6 +351,9 @@ .It Bq Er EIO An error occurred while reading from .Fa fd . +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from +.Fa fd . .It Bq Er ENOTCAPABLE The .Fa fd Index: lib/libc/sys/stat.2 =================================================================== --- lib/libc/sys/stat.2 +++ lib/libc/sys/stat.2 @@ -379,6 +379,8 @@ points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG @@ -410,6 +412,8 @@ points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EOVERFLOW The file size in bytes cannot be represented correctly in the structure pointed to by Index: lib/libc/sys/statfs.2 =================================================================== --- lib/libc/sys/statfs.2 +++ lib/libc/sys/statfs.2 @@ -204,6 +204,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp The @@ -225,6 +227,8 @@ An .Tn I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr fhstatfs 2 , Index: lib/libc/sys/swapon.2 =================================================================== --- lib/libc/sys/swapon.2 +++ lib/libc/sys/swapon.2 @@ -115,6 +115,9 @@ for the associated hardware). .It Bq Er EIO An I/O error occurred while opening the swap device. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system to open the +swap device. .El .Pp Lastly, Index: lib/libc/sys/symlink.2 =================================================================== --- lib/libc/sys/symlink.2 +++ lib/libc/sys/symlink.2 @@ -151,6 +151,8 @@ which the symbolic link is being created has been exhausted. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa name1 Index: lib/libc/sys/truncate.2 =================================================================== --- lib/libc/sys/truncate.2 +++ lib/libc/sys/truncate.2 @@ -117,6 +117,8 @@ argument was less than 0. .It Bq Er EIO An I/O error occurred updating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EFAULT The .Fa path Index: lib/libc/sys/undelete.2 =================================================================== --- lib/libc/sys/undelete.2 +++ lib/libc/sys/undelete.2 @@ -87,6 +87,8 @@ .Ql .. . .It Bq Er EIO An I/O error occurred while updating the directory entry. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The name resides on a read-only file system. .It Bq Er EFAULT Index: lib/libc/sys/unlink.2 =================================================================== --- lib/libc/sys/unlink.2 +++ lib/libc/sys/unlink.2 @@ -175,6 +175,8 @@ .It Bq Er EIO An I/O error occurred while deleting the directory entry or deallocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT Index: lib/libc/sys/utimensat.2 =================================================================== --- lib/libc/sys/utimensat.2 +++ lib/libc/sys/utimensat.2 @@ -200,6 +200,8 @@ .Dv UTIME_OMIT . .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EPERM The .Fa times Index: lib/libc/sys/utimes.2 =================================================================== --- lib/libc/sys/utimes.2 +++ lib/libc/sys/utimes.2 @@ -165,6 +165,8 @@ argument has a value less than 0 or greater than 999999. .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG Index: lib/libc/sys/write.2 =================================================================== --- lib/libc/sys/write.2 +++ lib/libc/sys/write.2 @@ -205,6 +205,12 @@ if the sysctl .Va debug.iosize_max_clamp is non-zero). +.It Bq Er EINTEGRITY +The backing store for +.Fa fd +detected corrupted data while reading. +(For example, writing a partial filesystem block may require first reading +the existing block which may trigger this error.) .El .Pp In addition,