1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
2006-01-05 Otavio Salvador <otavio@debian.org>
* Rediff.
2005-16-10 Samuel Thibault <samuel.thibault@ens-lyon.org>
* docs/grub.texi: Added print command description.
* stage2/builtins.c(print_func): New function.
(builtin_print): New variable.
(builtin_table): Added builtin_print in table.
Debian Status Following:
Added by: Otavio Salvador
Date: 2006-01-05
Index: b/docs/grub.texi
===================================================================
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -2696,6 +2696,7 @@
* module:: Load a module
* modulenounzip:: Load a module without decompression
* pause:: Wait for a key press
+* print:: Print a message
* quit:: Exit from the grub shell
* reboot:: Reboot your computer
* read:: Read data from memory
@@ -3102,6 +3103,16 @@
@end deffn
+@node print
+@subsection print
+
+@deffn Command print message @dots{}
+Print the @var{message}. Note that placing @key{^G} (ASCII code 7) in the
+message will cause the speaker to emit the standard beep sound, which is
+useful for visually impaired people.
+@end deffn
+
+
@node quit
@subsection quit
Index: b/stage2/builtins.c
===================================================================
--- a/stage2/builtins.c
+++ b/stage2/builtins.c
@@ -2595,6 +2595,25 @@
"Probe I/O ports used for the drive DRIVE."
};
+/* print */
+static int
+print_func (char *arg, int flags)
+{
+ printf("%s\n", arg);
+
+ return 0;
+}
+
+static struct builtin builtin_print =
+{
+ "print",
+ print_func,
+ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_NO_ECHO,
+ "print [MESSAGE ...]",
+ "Print MESSAGE."
+};
+
+
/* kernel */
static int
@@ -5142,6 +5161,7 @@
&builtin_parttype,
&builtin_password,
&builtin_pause,
+ &builtin_print,
#ifdef GRUB_UTIL
&builtin_quit,
#endif /* GRUB_UTIL */
|