mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
memfd-util: explain what memfd_create_wrapper() is for in a comment
This commit is contained in:
parent
caf1436ee8
commit
9b1d97cccd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user