memfd-util: explain what memfd_create_wrapper() is for in a comment

This commit is contained in:
Lennart Poettering
2024-12-17 18:26:15 +01:00
parent caf1436ee8
commit 9b1d97cccd
+5
View File
@@ -24,6 +24,11 @@ int memfd_create_wrapper(const char *name, unsigned mode) {
unsigned mode_compat;
int mfd;
assert(name);
/* Wrapper around memfd_create() which adds compat with older kernels where memfd_create() didn't
* support MFD_EXEC/MFD_NOEXEC_SEAL. (kernel 6.3+) */
mfd = RET_NERRNO(memfd_create(name, mode));
if (mfd != -EINVAL)
return mfd;