~ubuntu-branches/ubuntu/breezy/efibootmgr/breezy

« back to all changes in this revision

Viewing changes to src/include/efi.h

  • Committer: Bazaar Package Importer
  • Author(s): Bdale Garbee
  • Date: 2005-03-10 11:27:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050310112700-zhrfaz6gwvhode8u
Tags: 0.5.1-1
new upstream version. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
  efi.[ch] - Manipulates EFI variables as exported in /proc/efi/vars
3
 
 
4
 
  Copyright (C) 2001 Dell Computer Corporation <Matt_Domsch@dell.com>
5
 
 
 
2
  efi.[ch] - Extensible Firmware Interface definitions
 
3
 
 
4
  Copyright (C) 2001, 2003 Dell Computer Corporation <Matt_Domsch@dell.com>
 
5
 
6
6
    This program is free software; you can redistribute it and/or modify
7
7
    it under the terms of the GNU General Public License as published by
8
8
    the Free Software Foundation; either version 2 of the License, or
27
27
 *      version 1.02, 12 December, 2000
28
28
 */
29
29
#include <stdint.h>
 
30
#include <dirent.h>
30
31
 
31
32
#define BITS_PER_LONG (sizeof(unsigned long) * 8)
32
33
 
336
337
} __attribute__((packed)) END_DEVICE_PATH;
337
338
 
338
339
 
 
340
struct efivar_kernel_calls {
 
341
        efi_status_t (*read)(const char *name, efi_variable_t *var);
 
342
        efi_status_t (*edit)(const char *name, efi_variable_t *var);
 
343
        efi_status_t (*create)(efi_variable_t *var);
 
344
        efi_status_t (*delete)(efi_variable_t *var);
 
345
        char *path;
 
346
};
 
347
 
 
348
 
339
349
/* Used for ACPI _HID */
340
350
#define EISAID_PNP0A03 0xa0341d0
341
351
 
342
 
#define PROC_DIR_EFI_VARS "/proc/efi/vars/"
343
 
 
344
 
 
345
 
 
346
352
/* Exported functions */
347
353
 
348
 
efi_status_t read_variable(char *name, efi_variable_t *var);
349
 
efi_status_t write_variable(efi_variable_t *var);
350
 
int make_linux_efi_variable(efi_variable_t *var,
 
354
extern int make_linux_efi_variable(efi_variable_t *var,
351
355
                            unsigned int free_number);
352
 
char * efi_guid_unparse(efi_guid_t *guid, char *out);
353
 
EFI_DEVICE_PATH *load_option_path(EFI_LOAD_OPTION *option);
354
 
 
355
 
 
356
 
 
357
 
 
358
 
 
359
 
#endif /* _ASM_IA64_EFI_H */
 
356
extern char * efi_guid_unparse(efi_guid_t *guid, char *out);
 
357
extern EFI_DEVICE_PATH *load_option_path(EFI_LOAD_OPTION *option);
 
358
 
 
359
extern efi_status_t read_variable(const char *name, efi_variable_t *var);
 
360
extern efi_status_t edit_variable(efi_variable_t *var);
 
361
extern efi_status_t create_variable(efi_variable_t *var);
 
362
extern efi_status_t delete_variable(efi_variable_t *var);
 
363
extern efi_status_t create_or_edit_variable(efi_variable_t *var);
 
364
 
 
365
extern void set_fs_kernel_calls();
 
366
extern int read_boot_var_names(struct dirent ***namelist);
 
367
extern int variable_to_name(efi_variable_t *var, char *name);
 
368
extern int var_name_to_path(const char *name, char *path);
 
369
 
 
370
#endif /* EFI_H */