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:
@@ -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,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);
|
||||
|
||||
Reference in New Issue
Block a user