File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1515#include <linux/slab.h>
1616#include <linux/magic.h>
1717#include <linux/statfs.h>
18+ #include <linux/printk.h>
1819
1920#include "internal.h"
2021
@@ -333,9 +334,20 @@ static int efivarfs_get_tree(struct fs_context *fc)
333334 return get_tree_single (fc , efivarfs_fill_super );
334335}
335336
337+ static int efivarfs_reconfigure (struct fs_context * fc )
338+ {
339+ if (!efivar_supports_writes () && !(fc -> sb_flags & SB_RDONLY )) {
340+ pr_err ("Firmware does not support SetVariableRT. Can not remount with rw\n" );
341+ return - EINVAL ;
342+ }
343+
344+ return 0 ;
345+ }
346+
336347static const struct fs_context_operations efivarfs_context_ops = {
337348 .get_tree = efivarfs_get_tree ,
338349 .parse_param = efivarfs_parse_param ,
350+ .reconfigure = efivarfs_reconfigure ,
339351};
340352
341353static int efivarfs_init_fs_context (struct fs_context * fc )
You can’t perform that action at this time.
0 commit comments