~tomleb

https://blog.tomlebreux.com

I develop random projects to experiment and for fun.

Mastodon: @tomleb@hachyderm.io

~tomleb/public-inbox

Last active 1 year, 23 days ago

~tomleb/mpdnotify

Last active 4 years ago
View more

Recent activity

[PATCH hare] linux::keyctl: Add chown and setperm 3 months ago

From Tom Lebreux to ~sircmpwn/hare-dev

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
 linux/keyctl/+linux/keyctl.ha | 10 ++++++++++
 linux/keyctl/+linux/types.ha  | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/linux/keyctl/+linux/keyctl.ha b/linux/keyctl/+linux/keyctl.ha
index 3ef65397db59..71a7aab56e36 100644
--- a/linux/keyctl/+linux/keyctl.ha
+++ b/linux/keyctl/+linux/keyctl.ha
@@ -95,3 +95,13 @@ export fn read(id: serial, buf: []u8) (size | error) = {
	return keyctl(command::READ, id: u64,
		buf: uintptr: u64, bufln: u64, 0)?: size;
};
[message trimmed]

[PATCH hare] bufio: allow borrowedread up to last byte 9 months ago

From Tom Lebreux to ~sircmpwn/hare-dev

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
Assuming borrowedread([1,2,3], 3) should return [1,2,3] and not io::EOF
 bufio/memstream.ha | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/bufio/memstream.ha b/bufio/memstream.ha
index 9b34c5bb7be7..0a53a3e9bb04 100644
--- a/bufio/memstream.ha
@@ -141,7 +141,7 @@ export fn truncate(in: *memstream) (void | errors::unsupported) = {
// Reads data from a [[dynamic]] or [[fixed]] stream and returns a slice
// borrowed from the internal buffer.
export fn borrowedread(st: *memstream, amt: size) ([]u8 | io::EOF) = {
[message trimmed]

[PATCH mercury] bufio: allow to borrowread up to last byte 9 months ago

From Tom Lebreux to ~sircmpwn/helios-devel

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
I think that's the intended behavior.
 bufio/memstream.ha | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/bufio/memstream.ha b/bufio/memstream.ha
index e65acac5a0b1..06db61bd6f8e 100644
--- a/bufio/memstream.ha
@@ -141,7 +141,7 @@ export fn truncate(in: *memstream) (void | errors::unsupported) = {
// Reads data from a [[dynamic]] or [[fixed]] stream and returns a slice
// borrowed from the internal buffer.
export fn borrowedread(st: *memstream, amt: size) ([]u8 | io::EOF) = {
[message trimmed]

[PATCH mercury] Don't error when reading from end of tar file 9 months ago

From Tom Lebreux to ~sircmpwn/helios-devel

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
That seems to fix it for me. One issue was that when we were at the end of
the tar file and we attempted to read again (to get an io::EOF), it
would return an error instead of io::EOF.
 format/tar/reader.ha | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/format/tar/reader.ha b/format/tar/reader.ha
index cb67a8dbb8df..db4e6c73dd39 100644
--- a/format/tar/reader.ha
+++ b/format/tar/reader.ha
@@ -55,7 +55,7 @@ export fn next(rd: *reader) (entry | error | io::EOF) = {
			return truncated;
[message trimmed]

Re: [PATCH hare] net::ip: export parsev4 and parsev6 1 year, 1 day ago

From Tom Lebreux to ~sircmpwn/hare-dev


>+// Parses an IPv6 address.
> fn parsev6(st: str) (addr6 | invalid) = {
> 	let ret: addr6 = [0...];

Seems like parsev6 misses the export keyword.

[PATCH hare] rt/+linux/socket: add sockaddr_nl 1 year, 5 days ago

From Tom Lebreux to ~sircmpwn/hare-dev

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
 rt/+linux/socket.ha | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/rt/+linux/socket.ha b/rt/+linux/socket.ha
index 85878910cfa6..abcae46fe088 100644
--- a/rt/+linux/socket.ha
+++ b/rt/+linux/socket.ha
@@ -39,11 +39,19 @@ export type sockaddr_un = struct {
	sun_path: [UNIX_PATH_MAX]char,
};

export type sockaddr_nl = struct {
[message trimmed]

[PATCH hare] net: add setname 1 year, 5 days ago

From Tom Lebreux to ~sircmpwn/hare-dev

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
 net/msg.ha | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/msg.ha b/net/msg.ha
index 6033527a648a..3559047f7c96 100644
--- a/net/msg.ha
+++ b/net/msg.ha
@@ -59,6 +59,12 @@ export fn getflags(msg: *msghdr) int = {
	return msg.native.msg_flags;
};

// Sets name for this message.
[message trimmed]

[PATCH hare] net: add getflags 1 year, 5 days ago

From Tom Lebreux to ~sircmpwn/hare-dev

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
 net/msg.ha | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/msg.ha b/net/msg.ha
index 46e12f744a18..6033527a648a 100644
--- a/net/msg.ha
+++ b/net/msg.ha
@@ -54,6 +54,11 @@ export fn setflags(msg: *msghdr, flags: int) void = {
	msg.native.msg_flags = flags;
};

// Get flags for this message.
[message trimmed]

[PATCH] Add link to himitsu-git 1 year, 13 days ago

From Tom Lebreux to ~sircmpwn/himitsu-devel

Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
 index.html | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/index.html b/index.html
index efd97dc447d3..8873db8fb51a 100644
--- a/index.html
+++ b/index.html
@@ -70,6 +70,10 @@
      <a href="https://git.sr.ht/~sircmpwn/himitsu-ssh">himitsu-ssh</a>:
      integration with the SSH protocol
    </li>
    <li>
[message trimmed]

Firefox addons support site links gives 404 1 year, 8 months ago

From Tom Lebreux to ~sircmpwn/himitsu-devel

Hi,

as mentioned in #himitsu, the support site listed on the firefox addons 
page points to [0] which returns a 404.

[0]: https://sr.ht/~sircmpwn/himitsu-firefox/