Merge pull request #27041 from poettering/fdstore-dump

add ability to show contents of service fdstore + teach systemd-notify passing fds into the fdstore
This commit is contained in:
Daan De Meyer
2023-03-30 09:32:13 +02:00
committed by GitHub
30 changed files with 629 additions and 81 deletions
+13
View File
@@ -940,3 +940,16 @@ int dir_fd_is_root(int dir_fd) {
*/
return statx_inode_same(&st.sx, &pst.sx) && statx_mount_same(&st.nsx, &pst.nsx);
}
const char *accmode_to_string(int flags) {
switch (flags & O_ACCMODE) {
case O_RDONLY:
return "ro";
case O_WRONLY:
return "wo";
case O_RDWR:
return "rw";
default:
return NULL;
}
}