source: grub-pc/trunk/fuentes/include/grub/lib/envblk.h @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 1.7 KB
Line 
1/*
2 *  GRUB  --  GRand Unified Bootloader
3 *  Copyright (C) 2008,2009  Free Software Foundation, Inc.
4 *
5 *  GRUB is free software: you can redistribute it and/or modify
6 *  it under the terms of the GNU General Public License as published by
7 *  the Free Software Foundation, either version 3 of the License, or
8 *  (at your option) any later version.
9 *
10 *  GRUB is distributed in the hope that it will be useful,
11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 *  GNU General Public License for more details.
14 *
15 *  You should have received a copy of the GNU General Public License
16 *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef GRUB_ENVBLK_HEADER
20#define GRUB_ENVBLK_HEADER      1
21
22#define GRUB_ENVBLK_SIGNATURE   "# GRUB Environment Block\n"
23#define GRUB_ENVBLK_DEFCFG      "grubenv"
24
25#ifndef ASM_FILE
26
27struct grub_envblk
28{
29  char *buf;
30  grub_size_t size;
31};
32typedef struct grub_envblk *grub_envblk_t;
33
34grub_envblk_t grub_envblk_open (char *buf, grub_size_t size);
35int grub_envblk_set (grub_envblk_t envblk, const char *name, const char *value);
36void grub_envblk_delete (grub_envblk_t envblk, const char *name);
37void grub_envblk_iterate (grub_envblk_t envblk,
38                          void *hook_data,
39                          int hook (const char *name, const char *value, void *hook_data));
40void grub_envblk_close (grub_envblk_t envblk);
41
42static inline char *
43grub_envblk_buffer (const grub_envblk_t envblk)
44{
45  return envblk->buf;
46}
47
48static inline grub_size_t
49grub_envblk_size (const grub_envblk_t envblk)
50{
51  return envblk->size;
52}
53
54#endif /* ! ASM_FILE */
55
56#endif /* ! GRUB_ENVBLK_HEADER */
Note: See TracBrowser for help on using the repository browser.