# HG changeset patch # User Josef 'Jeff' Sipek # Date 1599449292 14400 # Node ID 616a36d39703c611b79c8c76e098565d7c0ee8d2 # Parent 4e86cf312d6c04c2a33e17e1a85ab5866566ebc2 error: add EEOF errno Signed-off-by: Josef 'Jeff' Sipek diff -r 4e86cf312d6c -r 616a36d39703 cmake/config-errno.cmake --- a/cmake/config-errno.cmake Fri Sep 04 07:34:28 2020 -0400 +++ b/cmake/config-errno.cmake Sun Sep 06 23:28:12 2020 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 2018 Josef 'Jeff' Sipek +# Copyright (c) 2018-2020 Josef 'Jeff' Sipek # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -42,3 +42,4 @@ find_errno(ECKSUM) find_errno(ENOTUNIQ) +find_errno(EEOF) diff -r 4e86cf312d6c -r 616a36d39703 error.c --- a/error.c Fri Sep 04 07:34:28 2020 -0400 +++ b/error.c Sun Sep 06 23:28:12 2020 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 Josef 'Jeff' Sipek + * Copyright (c) 2013-2020 Josef 'Jeff' Sipek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -318,6 +318,8 @@ return "Checksum mismatch"; case -ENOTUNIQ: return "Name, identifier, or object not unique"; + case -EEOF: + return "End of file"; } return strerror(-e); diff -r 4e86cf312d6c -r 616a36d39703 include/jeffpc/config.h.in --- a/include/jeffpc/config.h.in Fri Sep 04 07:34:28 2020 -0400 +++ b/include/jeffpc/config.h.in Sun Sep 06 23:28:12 2020 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Josef 'Jeff' Sipek + * Copyright (c) 2016-2020 Josef 'Jeff' Sipek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -46,6 +46,7 @@ #cmakedefine JEFFPC_ERRNO_ECKSUM ${JEFFPC_ERRNO_ECKSUM} #cmakedefine JEFFPC_ERRNO_ENOTUNIQ ${JEFFPC_ERRNO_ENOTUNIQ} +#cmakedefine JEFFPC_ERRNO_EEOF ${JEFFPC_ERRNO_EEOF} #cmakedefine JEFFPC_LOCK_TRACKING diff -r 4e86cf312d6c -r 616a36d39703 include/jeffpc/error.h --- a/include/jeffpc/error.h Fri Sep 04 07:34:28 2020 -0400 +++ b/include/jeffpc/error.h Sun Sep 06 23:28:12 2020 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 Josef 'Jeff' Sipek + * Copyright (c) 2013-2020 Josef 'Jeff' Sipek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -41,6 +41,9 @@ #ifdef JEFFPC_ERRNO_ENOTUNIQ #define ENOTUNIQ JEFFPC_ERRNO_ENOTUNIQ #endif +#ifdef JEFFPC_ERRNO_EEOF +#define EEOF JEFFPC_ERRNO_EEOF +#endif #define NORETURN __attribute__((__noreturn__)) diff -r 4e86cf312d6c -r 616a36d39703 io_common.h --- a/io_common.h Fri Sep 04 07:34:28 2020 -0400 +++ b/io_common.h Sun Sep 06 23:28:12 2020 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 Josef 'Jeff' Sipek + * Copyright (c) 2011-2020 Josef 'Jeff' Sipek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -54,7 +54,7 @@ } if (ret == 0) { - ret = -EPIPE; + ret = -EEOF; goto err; } diff -r 4e86cf312d6c -r 616a36d39703 man/xread.3 --- a/man/xread.3 Fri Sep 04 07:34:28 2020 -0400 +++ b/man/xread.3 Sun Sep 06 23:28:12 2020 -0400 @@ -1,4 +1,4 @@ -.Dd February 13, 2020 +.Dd September 6, 2020 .Dt XREAD 3 .Os .\" @@ -59,7 +59,7 @@ .Xr pread 2 , respectively with the following differences: .Bl -tag -width Er -.It Er -EPIPE +.It Er -EEOF The requested number of bytes could not be read. If .Fn xread