66#ifndef EFIVAR_FS_INTERNAL_H
77#define EFIVAR_FS_INTERNAL_H
88
9- #include <linux/list.h>
109#include <linux/efi.h>
1110
1211struct efivarfs_mount_opts {
@@ -16,30 +15,30 @@ struct efivarfs_mount_opts {
1615
1716struct efivarfs_fs_info {
1817 struct efivarfs_mount_opts mount_opts ;
19- struct list_head efivarfs_list ;
2018 struct super_block * sb ;
2119 struct notifier_block nb ;
2220};
2321
2422struct efi_variable {
2523 efi_char16_t VariableName [EFI_VAR_NAME_LEN /sizeof (efi_char16_t )];
2624 efi_guid_t VendorGuid ;
27- __u32 Attributes ;
2825};
2926
3027struct efivar_entry {
3128 struct efi_variable var ;
32- struct list_head list ;
33- struct kobject kobj ;
29+ struct inode vfs_inode ;
30+ unsigned long open_count ;
31+ bool removed ;
3432};
3533
36- int efivar_init (int (* func )(efi_char16_t * , efi_guid_t , unsigned long , void * ,
37- struct list_head * ),
38- void * data , struct list_head * head );
34+ static inline struct efivar_entry * efivar_entry (struct inode * inode )
35+ {
36+ return container_of (inode , struct efivar_entry , vfs_inode );
37+ }
38+
39+ int efivar_init (int (* func )(efi_char16_t * , efi_guid_t , unsigned long , void * ),
40+ void * data );
3941
40- int efivar_entry_add (struct efivar_entry * entry , struct list_head * head );
41- void __efivar_entry_add (struct efivar_entry * entry , struct list_head * head );
42- void efivar_entry_remove (struct efivar_entry * entry );
4342int efivar_entry_delete (struct efivar_entry * entry );
4443
4544int efivar_entry_size (struct efivar_entry * entry , unsigned long * size );
@@ -50,13 +49,14 @@ int efivar_entry_get(struct efivar_entry *entry, u32 *attributes,
5049int efivar_entry_set_get_size (struct efivar_entry * entry , u32 attributes ,
5150 unsigned long * size , void * data , bool * set );
5251
53- int efivar_entry_iter (int (* func )(struct efivar_entry * , void * ),
54- struct list_head * head , void * data );
5552
5653bool efivar_validate (efi_guid_t vendor , efi_char16_t * var_name , u8 * data ,
5754 unsigned long data_size );
5855bool efivar_variable_is_removable (efi_guid_t vendor , const char * name ,
5956 size_t len );
57+ char * efivar_get_utf8name (const efi_char16_t * name16 , efi_guid_t * vendor );
58+ bool efivarfs_variable_is_present (efi_char16_t * variable_name ,
59+ efi_guid_t * vendor , void * data );
6060
6161extern const struct file_operations efivarfs_file_operations ;
6262extern const struct inode_operations efivarfs_dir_inode_operations ;
0 commit comments