stat-util: make sure inode_type_to_string() handles anonymous inodes in a reasonable way

This commit is contained in:
Lennart Poettering
2024-03-12 10:45:24 +01:00
parent 1c248d7fb7
commit 7cff2b79f0
2 changed files with 18 additions and 0 deletions
+2
View File
@@ -535,6 +535,8 @@ const char* inode_type_to_string(mode_t m) {
return "sock";
}
/* Note anonmyous inodes in the kernel will have a zero type. Hence fstat() of an eventfd() will
* return an .st_mode where we'll return NULL here! */
return NULL;
}