~sircmpwn/hare-dev

hare: os+linux: Fix resolve_flag values v1 NEEDS REVISION

Alexey Yerin: 1
 os+linux: Fix resolve_flag values

 1 files changed, 6 insertions(+), 6 deletions(-)
#1186079 alpine.yml success
#1186080 freebsd.yml success
#1186081 openbsd.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/50705/mbox | git am -3
Learn more about email & git

[PATCH hare] os+linux: Fix resolve_flag values Export this patch

Signed-off-by: Alexey Yerin <yyp@disroot.org>
---
 os/+linux/dirfdfs.ha | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/os/+linux/dirfdfs.ha b/os/+linux/dirfdfs.ha
index 8ed155d8..538a4399 100644
--- a/os/+linux/dirfdfs.ha
+++ b/os/+linux/dirfdfs.ha
@@ -17,27 +17,27 @@ use types::c;
//
// Note that on Linux, specifying BENEATH or IN_ROOT will also disable magic
// symlinks.
export type resolve_flag = enum {
	NORMAL,
export type resolve_flag = enum uint {
	NORMAL = 0,

	// Does not allow symlink resolution to occur for any symlinks which
	// would refer to any anscestor of the fd directory. This disables all
	// absolute symlinks, and any call to open or create with an absolute
	// path.
	BENEATH,
	BENEATH = 1 << 0,

	// Treat the directory fd as the root directory. This affects
	// open/create for absolute paths, as well as absolute path resolution
	// of symlinks. The effects are similar to chroot.
	IN_ROOT,
	IN_ROOT = 1 << 1,

	// Disables symlink resolution entirely.
	NO_SYMLINKS,
	NO_SYMLINKS = 1 << 2,

	// Disallows traversal of mountpoints during path resolution. This is
	// not recommended for general use, as bind mounts are extensively used
	// on many systems.
	NO_XDEV,
	NO_XDEV = 1 << 3,
};

type os_filesystem = struct {
-- 
2.44.0
Should these values match the values defined in linux/openat2.h?
I can see arguments against making them match, but then we should document
that in the definition of this type.
hare/patches: SUCCESS in 1m0s

[os+linux: Fix resolve_flag values][0] from [Alexey Yerin][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/50705
[1]: mailto:yyp@disroot.org

✓ #1186080 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/1186080
✓ #1186081 SUCCESS hare/patches/openbsd.yml https://builds.sr.ht/~sircmpwn/job/1186081
✓ #1186079 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/1186079