~sircmpwn/hare-dev

hare: linux::timerfd: read: report read errors v1 APPLIED

Pinghao Wu: 1
 linux::timerfd: read: report read errors

 1 files changed, 6 insertions(+), 1 deletions(-)
#789087 alpine.yml success
#789088 freebsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/33327/mbox | git am -3
Learn more about email & git

[PATCH hare] linux::timerfd: read: report read errors Export this patch

Read errors like EINTR may happen here.

Signed-off-by: Pinghao Wu <xdavidwuph@gmail.com>
---
 linux/timerfd/timerfd.ha | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/linux/timerfd/timerfd.ha b/linux/timerfd/timerfd.ha
index 3c413ed2..256972ba 100644
--- a/linux/timerfd/timerfd.ha
+++ b/linux/timerfd/timerfd.ha
@@ -97,7 +97,12 @@ export fn read(
	t: io::file
) (u64 | errors::error) = {
	let expirations: [8]u8 = [0...];
	io::read(t, expirations)!;
	match (rt::read(t, &expirations, len(expirations))) {
	case let err: rt::errno =>
		return errors::errno(err);
	case let z: size =>
		assert(z == len(expirations));
	};
	return endian::host.getu64(expirations);
};

-- 
2.36.1
hare/patches: SUCCESS in 1m44s

[linux::timerfd: read: report read errors][0] from [Pinghao Wu][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/33327
[1]: mailto:xdavidwuph@gmail.com

✓ #789087 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/789087
✓ #789088 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/789088
Thanks!

To git@git.sr.ht:~sircmpwn/hare
   10d78afa..1db5f9b5  master -> master