Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 593177 Details for
Bug 828092
grub chain loading kills serial port in child boot loader
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to make console_input_test module
console_test.diff (text/plain), 4.33 KB, created by
Vladimir Serbinenko
on 2012-06-20 10:55:30 UTC
(
hide
)
Description:
Patch to make console_input_test module
Filename:
MIME Type:
Creator:
Vladimir Serbinenko
Created:
2012-06-20 10:55:30 UTC
Size:
4.33 KB
patch
obsolete
>=== modified file 'grub-core/Makefile.core.def' >--- grub-core/Makefile.core.def 2012-06-11 18:44:38 +0000 >+++ grub-core/Makefile.core.def 2012-06-20 08:04:12 +0000 >@@ -1810,6 +1810,11 @@ > }; > > module = { >+ name = console_input_test; >+ common = commands/console_input_test.c; >+}; >+ >+module = { > name = cacheinfo; > common = commands/cacheinfo.c; > condition = COND_ENABLE_CACHE_STATS; > >=== added file 'grub-core/commands/console_input_test.c' >--- grub-core/commands/console_input_test.c 1970-01-01 00:00:00 +0000 >+++ grub-core/commands/console_input_test.c 2012-06-20 10:39:19 +0000 >@@ -0,0 +1,122 @@ >+/* >+ * GRUB -- GRand Unified Bootloader >+ * Copyright (C) 2012 Free Software Foundation, Inc. >+ * >+ * GRUB is free software: you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+ * the Free Software Foundation, either version 3 of the License, or >+ * (at your option) any later version. >+ * >+ * GRUB is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ * GNU General Public License for more details. >+ * >+ * You should have received a copy of the GNU General Public License >+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>. >+ */ >+ >+#include <grub/types.h> >+#include <grub/misc.h> >+#include <grub/mm.h> >+#include <grub/err.h> >+#include <grub/dl.h> >+#include <grub/command.h> >+#include <grub/i18n.h> >+#include <grub/term.h> >+#include <grub/time.h> >+ >+GRUB_MOD_LICENSE ("GPLv3+"); >+ >+const struct >+{ >+ int key; >+ const char *name; >+} specials[] = >+ { >+ {GRUB_TERM_KEY_LEFT, N_("left")}, >+ {GRUB_TERM_KEY_RIGHT, N_("right")}, >+ {GRUB_TERM_KEY_UP, N_("up")}, >+ {GRUB_TERM_KEY_DOWN, N_("down")}, >+ {GRUB_TERM_KEY_HOME, N_("home")}, >+ {GRUB_TERM_KEY_END, N_("end")}, >+ {GRUB_TERM_KEY_DC, N_("delete")}, >+ {GRUB_TERM_KEY_PPAGE, N_("PgUp")}, >+ {GRUB_TERM_KEY_NPAGE, N_("PgDn")}, >+ {GRUB_TERM_KEY_F1, N_("F1")}, >+ {GRUB_TERM_KEY_F2, N_("F2")}, >+ {GRUB_TERM_KEY_F3, N_("F3")}, >+ {GRUB_TERM_KEY_F4, N_("F4")}, >+ {GRUB_TERM_KEY_F5, N_("F5")}, >+ {GRUB_TERM_KEY_F6, N_("F6")}, >+ {GRUB_TERM_KEY_F7, N_("F7")}, >+ {GRUB_TERM_KEY_F8, N_("F8")}, >+ {GRUB_TERM_KEY_F9, N_("F9")}, >+ {GRUB_TERM_KEY_F10, N_("F10")}, >+ {GRUB_TERM_KEY_F11, N_("F11")}, >+ {GRUB_TERM_KEY_F12, N_("F12")}, >+ {GRUB_TERM_KEY_INSERT, N_("Insert")}, >+ {GRUB_TERM_KEY_CENTER, N_("Center")}, >+ {GRUB_TERM_ESC, N_("Esc")}, >+ {GRUB_TERM_TAB, N_("Tab")}, >+ {GRUB_TERM_BACKSPACE, N_("Backspace")}, >+ {'\n', N_("Enter (\\n)")}, >+ {'\r', N_("Enter (\\r)")}, >+ }; >+ >+static grub_err_t >+grub_cmd_test_console (grub_command_t cmd __attribute__ ((unused)), >+ int argc __attribute__ ((unused)), >+ char **args __attribute__ ((unused))) >+{ >+ grub_uint64_t start = grub_get_time_ms (); >+ int state = 0; >+ const char quit[] = "quit"; >+ grub_printf ("%s\n", _("Type `quit' to quit")); >+ while (state != 4) >+ { >+ int key; >+ grub_uint64_t ti, sec, ms; >+ unsigned i; >+ key = grub_getkey (); >+ ti = grub_get_time_ms (); >+ if (quit[state] == key) >+ state++; >+ else if (quit[0] == key) >+ state = 1; >+ else >+ state = 0; >+ sec = grub_divmod64 (ti - start, 1000, &ms); >+ grub_printf ("%" PRIuGRUB_UINT64_T ".%03" PRIuGRUB_UINT64_T " %s: %08x ", >+ /* TRANSLATORS: This `s' stands for `seconds'. */ >+ sec, ms, _("s"), key); >+ if (key & GRUB_TERM_SHIFT) >+ grub_puts_ (N_("Shift+")); >+ if (key & GRUB_TERM_CTRL) >+ grub_puts_ (N_("Ctrl+")); >+ if (key & GRUB_TERM_ALT) >+ grub_puts_ (N_("Alt+")); >+ key &= ~(GRUB_TERM_ALT | GRUB_TERM_CTRL | GRUB_TERM_SHIFT); >+ for (i = 0; i < ARRAY_SIZE (specials); i++) >+ if (key == specials[i].key) >+ break; >+ if (i < ARRAY_SIZE (specials)) >+ grub_printf ("%s\n", specials[i].name); >+ else >+ grub_printf ("%C\n", key); >+ } >+ return 0; >+} >+ >+static grub_command_t cmd; >+ >+GRUB_MOD_INIT(console_input_test) >+{ >+ cmd = grub_register_command ("console_input_test", grub_cmd_test_console, 0, >+ N_("Echo back anything typed on console.")); >+} >+ >+GRUB_MOD_FINI(console_input_test) >+{ >+ grub_unregister_command (cmd); >+} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 828092
:
592889
| 593177 |
593178