* cmosclean command name
@ 2013-12-27 2:22 Colin Watson
2013-12-27 4:04 ` Andrey Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Colin Watson @ 2013-12-27 2:22 UTC (permalink / raw)
To: grub-devel
While writing up NEWS entries for 2.02, I noticed a slight irregularity
in grub-core/commands/i386/cmostest.c: the "cmosclean" command is
described as "Clear bit at BYTE:BIT in CMOS.". Wouldn't the command be
better named "cmosclear" rather than "cmosclean"? "Clean" is an odd
verb to use for this in English.
If we're going to rename this, we should ideally do it before 2.02.
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cmosclean command name
2013-12-27 2:22 cmosclean command name Colin Watson
@ 2013-12-27 4:04 ` Andrey Borzenkov
2013-12-28 2:31 ` Colin Watson
0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2013-12-27 4:04 UTC (permalink / raw)
To: grub-devel
В Пт, 27/12/2013 в 02:22 +0000, Colin Watson пишет:
> While writing up NEWS entries for 2.02, I noticed a slight irregularity
> in grub-core/commands/i386/cmostest.c: the "cmosclean" command is
> described as "Clear bit at BYTE:BIT in CMOS.". Wouldn't the command be
> better named "cmosclear" rather than "cmosclean"? "Clean" is an odd
> verb to use for this in English.
>
Sounds fine and is better counterpart to"cmosset".
> If we're going to rename this, we should ideally do it before 2.02.
>
> Thanks,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cmosclean command name
2013-12-27 4:04 ` Andrey Borzenkov
@ 2013-12-28 2:31 ` Colin Watson
2013-12-28 5:18 ` Andrey Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Colin Watson @ 2013-12-28 2:31 UTC (permalink / raw)
To: grub-devel
On Fri, Dec 27, 2013 at 08:04:09AM +0400, Andrey Borzenkov wrote:
> В Пт, 27/12/2013 в 02:22 +0000, Colin Watson пишет:
> > While writing up NEWS entries for 2.02, I noticed a slight irregularity
> > in grub-core/commands/i386/cmostest.c: the "cmosclean" command is
> > described as "Clear bit at BYTE:BIT in CMOS.". Wouldn't the command be
> > better named "cmosclear" rather than "cmosclean"? "Clean" is an odd
> > verb to use for this in English.
>
> Sounds fine and is better counterpart to"cmosset".
I realised that I was wrong that it was introduced in 2.02, though; it
was in fact new in 1.99, so it needs more of an effort at compatibility.
What do people think of this?
* Rename "cmosclean" command to "cmosclear", leaving an alias for
compatibility. Similarly, rename "GRUB_BUTTON_CMOS_CLEAN" to
"GRUB_BUTTON_CMOS_CLEAR" and leave an alias.
diff --git a/docs/grub.texi b/docs/grub.texi
index 46b9e7f..145f051 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -3771,7 +3771,7 @@ you forget a command, you can run the command @command{help}
* cat:: Show the contents of a file
* chainloader:: Chain-load another boot loader
* clear:: Clear the screen
-* cmosclean:: Clear bit in CMOS
+* cmosclear:: Clear bit in CMOS
* cmosdump:: Dump CMOS contents
* cmostest:: Test bit in CMOS
* cmp:: Compare two files
@@ -3986,12 +3986,14 @@ Clear the screen.
@end deffn
-@node cmosclean
-@subsection cmosclean
+@node cmosclear
+@subsection cmosclear
-@deffn Command cmosclean byte:bit
+@deffn Command cmosclear byte:bit
Clear value of bit in CMOS at location @var{byte}:@var{bit}. This command
is available only on platforms that support CMOS.
+
+(Backward compatibility alias: cmosclean.)
@end deffn
@@ -5717,7 +5719,7 @@ Advanced operations for power users:
Miscelaneous:
@itemize
@item cmos (x86-*, ieee1275, mips-qemu_mips, mips-loongson): cmostest
- (used on some laptops to check for special power-on key), cmosclean
+ (used on some laptops to check for special power-on key), cmosclear
@item i386-pc: play
@end itemize
diff --git a/grub-core/commands/i386/cmostest.c b/grub-core/commands/i386/cmostest.c
index e5dea07..fb8ebec 100644
--- a/grub-core/commands/i386/cmostest.c
+++ b/grub-core/commands/i386/cmostest.c
@@ -64,7 +64,7 @@ grub_cmd_cmostest (struct grub_command *cmd __attribute__ ((unused)),
}
static grub_err_t
-grub_cmd_cmosclean (struct grub_command *cmd __attribute__ ((unused)),
+grub_cmd_cmosclear (struct grub_command *cmd __attribute__ ((unused)),
int argc, char *argv[])
{
int byte, bit;
@@ -99,7 +99,7 @@ grub_cmd_cmosset (struct grub_command *cmd __attribute__ ((unused)),
return grub_cmos_write (byte, value | (1 << bit));
}
-static grub_command_t cmd, cmd_clean, cmd_set;
+static grub_command_t cmd, cmd_clear, cmd_clean, cmd_set;
\f
GRUB_MOD_INIT(cmostest)
@@ -107,7 +107,11 @@ GRUB_MOD_INIT(cmostest)
cmd = grub_register_command ("cmostest", grub_cmd_cmostest,
N_("BYTE:BIT"),
N_("Test bit at BYTE:BIT in CMOS."));
- cmd_clean = grub_register_command ("cmosclean", grub_cmd_cmosclean,
+ cmd_clear = grub_register_command ("cmosclear", grub_cmd_cmosclear,
+ N_("BYTE:BIT"),
+ N_("Clear bit at BYTE:BIT in CMOS."));
+ /* Backward compatibility alias. */
+ cmd_clean = grub_register_command ("cmosclean", grub_cmd_cmosclear,
N_("BYTE:BIT"),
N_("Clear bit at BYTE:BIT in CMOS."));
cmd_set = grub_register_command ("cmosset", grub_cmd_cmosset,
@@ -119,6 +123,7 @@ GRUB_MOD_INIT(cmostest)
GRUB_MOD_FINI(cmostest)
{
grub_unregister_command (cmd);
+ grub_unregister_command (cmd_clear);
grub_unregister_command (cmd_clean);
grub_unregister_command (cmd_set);
}
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index ca040dd..a5f2cf2 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -174,6 +174,11 @@ GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT"
if [ "x${GRUB_ACTUAL_DEFAULT}" = "xsaved" ] ; then GRUB_ACTUAL_DEFAULT="`"${grub_editenv}" - list | sed -n '/^saved_entry=/ s,^saved_entry=,,p'`" ; fi
+if [ "x${GRUB_BUTTON_CMOS_CLEAR}" = x ] && \
+ [ "x${GRUB_BUTTON_CMOS_CLEAN}" != x ]; then
+ GRUB_BUTTON_CMOS_CLEAR="${GRUB_BUTTON_CMOS_CLEAN}"
+fi
+
# These are defined in this script, export them here so that user can
# override them.
@@ -197,7 +202,7 @@ export GRUB_DEFAULT \
GRUB_TIMEOUT_BUTTON \
GRUB_TIMEOUT_STYLE_BUTTON \
GRUB_BUTTON_CMOS_ADDRESS \
- GRUB_BUTTON_CMOS_CLEAN \
+ GRUB_BUTTON_CMOS_CLEAR \
GRUB_DISTRIBUTOR \
GRUB_CMDLINE_LINUX \
GRUB_CMDLINE_LINUX_DEFAULT \
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index 0c82f23..8e920c3 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -340,9 +340,9 @@ else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
fi
-if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then
+if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAR" = "xyes" ]; then
cat <<EOF
-cmosclean $GRUB_BUTTON_CMOS_ADDRESS
+cmosclear $GRUB_BUTTON_CMOS_ADDRESS
EOF
fi
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: cmosclean command name
2013-12-28 2:31 ` Colin Watson
@ 2013-12-28 5:18 ` Andrey Borzenkov
0 siblings, 0 replies; 4+ messages in thread
From: Andrey Borzenkov @ 2013-12-28 5:18 UTC (permalink / raw)
To: grub-devel
В Сб, 28/12/2013 в 02:31 +0000, Colin Watson пишет:
> On Fri, Dec 27, 2013 at 08:04:09AM +0400, Andrey Borzenkov wrote:
> > В Пт, 27/12/2013 в 02:22 +0000, Colin Watson пишет:
> > > While writing up NEWS entries for 2.02, I noticed a slight irregularity
> > > in grub-core/commands/i386/cmostest.c: the "cmosclean" command is
> > > described as "Clear bit at BYTE:BIT in CMOS.". Wouldn't the command be
> > > better named "cmosclear" rather than "cmosclean"? "Clean" is an odd
> > > verb to use for this in English.
> >
> > Sounds fine and is better counterpart to"cmosset".
>
> I realised that I was wrong that it was introduced in 2.02, though; it
> was in fact new in 1.99, so it needs more of an effort at compatibility.
> What do people think of this?
>
> * Rename "cmosclean" command to "cmosclear", leaving an alias for
> compatibility. Similarly, rename "GRUB_BUTTON_CMOS_CLEAN" to
> "GRUB_BUTTON_CMOS_CLEAR" and leave an alias.
>
Good occasion to also add description of "GRUB_BUTTON_CMOS_CLEAR" to
documentation :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-28 5:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-27 2:22 cmosclean command name Colin Watson
2013-12-27 4:04 ` Andrey Borzenkov
2013-12-28 2:31 ` Colin Watson
2013-12-28 5:18 ` Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).