binfmt-util: rename binfmt_mounted() -> binfmt_mounted_and_writable()

As it does not only check if binfmt_misc is mounted, but also check if
it is writable.
This commit is contained in:
Yu Watanabe
2025-07-10 14:02:00 +09:00
parent bd068e2903
commit 9a33cbac7d
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -11,7 +11,7 @@
#include "missing_magic.h"
#include "stat-util.h"
int binfmt_mounted(void) {
int binfmt_mounted_and_writable(void) {
_cleanup_close_ int fd = -EBADF;
int r;
@@ -43,7 +43,7 @@ int disable_binfmt(void) {
* We are a bit careful here, since binfmt_misc might still be an autofs which we don't want to
* trigger. */
r = binfmt_mounted();
r = binfmt_mounted_and_writable();
if (r < 0)
return log_warning_errno(r, "Failed to determine whether binfmt_misc is mounted: %m");
if (r == 0) {
+1 -1
View File
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
int binfmt_mounted(void);
int binfmt_mounted_and_writable(void);
int disable_binfmt(void);