~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to include/grub/command.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <grub/err.h>
24
24
#include <grub/list.h>
25
25
 
26
 
/* Can be run in the command-line.  */
27
 
#define GRUB_COMMAND_FLAG_CMDLINE       0x1
28
 
/* Can be run in the menu.  */
29
 
#define GRUB_COMMAND_FLAG_MENU          0x2
30
 
/* Can be run in both interfaces.  */
31
 
#define GRUB_COMMAND_FLAG_BOTH          0x3
32
 
/* Only for the command title.  */
33
 
#define GRUB_COMMAND_FLAG_TITLE         0x4
34
 
/* Don't print the command on booting.  */
35
 
#define GRUB_COMMAND_FLAG_NO_ECHO       0x8
36
 
/* This is an extended command.  */
37
 
#define GRUB_COMMAND_FLAG_EXTCMD        0x10
38
 
/* This is an dynamic command.  */
39
 
#define GRUB_COMMAND_FLAG_DYNCMD        0x20
 
26
typedef enum grub_command_flags
 
27
  {
 
28
    /* This is an extended command.  */
 
29
    GRUB_COMMAND_FLAG_EXTCMD = 0x10,
 
30
    /* This is an dynamic command.  */
 
31
    GRUB_COMMAND_FLAG_DYNCMD = 0x20,
 
32
    /* This command accepts block arguments.  */
 
33
    GRUB_COMMAND_FLAG_BLOCKS = 0x40,
 
34
    /* This command accepts unknown arguments as direct parameters.  */
 
35
    GRUB_COMMAND_ACCEPT_DASH = 0x80,
 
36
    /* This command accepts only options preceding direct arguments.  */
 
37
    GRUB_COMMAND_OPTIONS_AT_START = 0x100,
 
38
    /* Can be executed in an entries extractor.  */
 
39
    GRUB_COMMAND_FLAG_EXTRACTOR = 0x200
 
40
  } grub_command_flags_t;
40
41
 
41
42
struct grub_command;
42
43
 
59
60
  grub_command_func_t func;
60
61
 
61
62
  /* The flags.  */
62
 
  unsigned flags;
 
63
  grub_command_flags_t flags;
63
64
 
64
65
  /* The summary of the command usage.  */
65
66
  const char *summary;
115
116
  return (cmd) ? cmd->func (cmd, argc, argv) : GRUB_ERR_FILE_NOT_FOUND;
116
117
}
117
118
 
118
 
static inline int
119
 
grub_command_iterate (int (*func) (grub_command_t))
120
 
{
121
 
  return grub_list_iterate (GRUB_AS_LIST (grub_command_list),
122
 
                            (grub_list_hook_t) func);
123
 
}
 
119
#define FOR_COMMANDS(var) FOR_LIST_ELEMENTS((var), grub_command_list)
124
120
 
125
121
void grub_register_core_commands (void);
126
122