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 154515 Details for
Bug 239760
a quiet mode for grub
[?]
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]
Ubuntu patch
quiet.diff (text/plain), 6.48 KB, created by
Matthias Clasen
on 2007-05-11 03:57:47 UTC
(
hide
)
Description:
Ubuntu patch
Filename:
MIME Type:
Creator:
Matthias Clasen
Created:
2007-05-11 03:57:47 UTC
Size:
6.48 KB
patch
obsolete
>diff -Naur grub-0.97.orig/stage2/boot.c grub-0.97/stage2/boot.c >--- grub-0.97.orig/stage2/boot.c 2004-03-30 06:44:08.000000000 -0500 >+++ grub-0.97/stage2/boot.c 2006-07-08 07:37:35.000000000 -0400 >@@ -280,8 +280,9 @@ > errnum = ERR_WONT_FIT; > else > { >- grub_printf (" [Linux-%s, setup=0x%x, size=0x%x]\n", >- (big_linux ? "bzImage" : "zImage"), data_len, text_len); >+ if (!quiet_boot) >+ grub_printf (" [Linux-%s, setup=0x%x, size=0x%x]\n", >+ (big_linux ? "bzImage" : "zImage"), data_len, text_len); > > /* Video mode selection support. What a mess! */ > /* NOTE: Even the word "mess" is not still enough to >@@ -487,7 +488,8 @@ > mbi.syms.a.addr = 0; > mbi.syms.a.pad = 0; > >- printf (" [%s-%s", str2, str); >+ if (!quiet_boot) >+ printf (" [%s-%s", str2, str); > > str = ""; > >@@ -495,8 +497,9 @@ > { > if (flags & MULTIBOOT_AOUT_KLUDGE) > str = "-and-data"; >- >- printf (", loadaddr=0x%x, text%s=0x%x", cur_addr, str, text_len); >+ >+ if (!quiet_boot) >+ printf (", loadaddr=0x%x, text%s=0x%x", cur_addr, str, text_len); > > /* read text, then read data */ > if (grub_read ((char *) RAW_ADDR (cur_addr), text_len) == text_len) >@@ -733,6 +736,7 @@ > > if (! errnum) > { >+ if (!quiet_boot) > grub_printf (", entry=0x%x]\n", (unsigned) entry_addr); > > /* If the entry address is physically different from that of the ELF >@@ -836,7 +840,8 @@ > moveto -= 0x10000; > memmove ((void *) RAW_ADDR (moveto), (void *) cur_addr, len); > >- printf (" [Linux-initrd @ 0x%x, 0x%x bytes]\n", moveto, len); >+ if (!quiet_boot) >+ printf (" [Linux-initrd @ 0x%x, 0x%x bytes]\n", moveto, len); > > /* FIXME: Should check if the kernel supports INITRD. */ > lh->ramdisk_image = RAW_ADDR (moveto); >diff -Naur grub-0.97.orig/stage2/builtins.c grub-0.97/stage2/builtins.c >--- grub-0.97.orig/stage2/builtins.c 2005-02-15 16:58:23.000000000 -0500 >+++ grub-0.97/stage2/builtins.c 2006-07-08 13:53:51.000000000 -0400 >@@ -75,6 +75,8 @@ > int grub_timeout = -1; > /* Whether to show the menu or not. */ > int show_menu = 1; >+/* Whether to quiet boot messages or not. */ >+int quiet_boot = 1; > /* The BIOS drive map. */ > static unsigned short bios_drive_map[DRIVE_MAP_SIZE + 1]; > >@@ -248,6 +250,7 @@ > cleanup_net (); > #endif > >+ grub_printf("Starting up ...\n"); > switch (kernel_type) > { > case KERNEL_TYPE_FREEBSD: >@@ -342,7 +345,8 @@ > } > > /* Notify the configuration. */ >- print_network_configuration (); >+ if (!quiet_boot) >+ print_network_configuration (); > > /* XXX: this can cause an endless loop, but there is no easy way to > detect such a loop unfortunately. */ >@@ -1599,6 +1603,25 @@ > "Hide the menu." > #endif > }; >+ >+/* quietboot */ >+static int >+quietboot_func (char *arg, int flags) >+{ >+ quiet_boot = 1; >+ return 0; >+} >+ >+static struct builtin builtin_quietboot = >+{ >+ "quiet", >+ quietboot_func, >+ BUILTIN_CMDLINE, >+#if 0 >+ "quietboot", >+ "Quiet boot messages." >+#endif >+}; > > > /* hide */ >@@ -1663,8 +1686,8 @@ > errnum = ERR_BAD_ARGUMENT; > return 1; > } >- >- print_network_configuration (); >+ if (!quiet_boot) >+ print_network_configuration (); > return 0; > } > >@@ -3019,7 +3042,8 @@ > } > > /* Notify the configuration. */ >- print_network_configuration (); >+ if (!quiet_boot) >+ print_network_configuration (); > return 0; > } > >@@ -3109,7 +3133,8 @@ > /* Print the filesystem information. */ > current_partition = saved_partition; > current_drive = saved_drive; >- print_fsys_type (); >+ if (!quiet_boot) >+ print_fsys_type (); > } > > static int >@@ -3120,10 +3145,13 @@ > char *next; > > /* If ARG is empty, just print the current root device. */ >- if (! *arg) >+ if (!quiet_boot) > { >- print_root_device (); >- return 0; >+ if (! *arg) >+ { >+ print_root_device (); >+ return 0; >+ } > } > > /* Call set_device to get the drive and the partition in ARG. */ >@@ -3165,7 +3193,8 @@ > return 1; > > /* Print the type of the filesystem. */ >- print_fsys_type (); >+ if (!quiet_boot) >+ print_fsys_type (); > } > > return 0; >@@ -4578,8 +4607,8 @@ > errnum = ERR_BAD_ARGUMENT; > return 1; > } >- >- print_network_configuration (); >+ if (!quiet_boot) >+ print_network_configuration (); > return 0; > } > >@@ -4851,6 +4880,7 @@ > #ifdef GRUB_UTIL > &builtin_quit, > #endif /* GRUB_UTIL */ >+ &builtin_quietboot, > #ifdef SUPPORT_NETBOOT > &builtin_rarp, > #endif /* SUPPORT_NETBOOT */ >diff -Naur grub-0.97.orig/stage2/char_io.c grub-0.97/stage2/char_io.c >--- grub-0.97.orig/stage2/char_io.c 2005-02-01 15:51:23.000000000 -0500 >+++ grub-0.97/stage2/char_io.c 2006-07-08 14:07:53.000000000 -0400 >@@ -237,9 +237,6 @@ > init_page (void) > { > cls (); >- >- grub_printf ("\n GNU GRUB version %s (%dK lower / %dK upper memory)\n\n", >- version_string, mbi.mem_lower, mbi.mem_upper); > } > > /* The number of the history entries. */ >diff -Naur grub-0.97.orig/stage2/cmdline.c grub-0.97/stage2/cmdline.c >--- grub-0.97.orig/stage2/cmdline.c 2004-08-16 19:23:01.000000000 -0400 >+++ grub-0.97/stage2/cmdline.c 2006-07-08 07:37:35.000000000 -0400 >@@ -229,16 +229,22 @@ > } > > /* Find a builtin. */ >+ > builtin = find_command (heap); > if (! builtin) > { >+ if(!quiet_boot) >+ { > grub_printf ("%s\n", old_entry); > continue; >+ } > } > > if (! (builtin->flags & BUILTIN_NO_ECHO)) >- grub_printf ("%s\n", old_entry); >- >+ { >+ if (!quiet_boot) >+ grub_printf ("%s\n", old_entry); >+ } > /* If BUILTIN cannot be run in the command-line, skip it. */ > if (! (builtin->flags & BUILTIN_CMDLINE)) > { >diff -Naur grub-0.97.orig/stage2/shared.h grub-0.97/stage2/shared.h >--- grub-0.97.orig/stage2/shared.h 2004-06-19 12:40:09.000000000 -0400 >+++ grub-0.97/stage2/shared.h 2006-07-08 07:37:35.000000000 -0400 >@@ -854,6 +854,7 @@ > > extern kernel_t kernel_type; > extern int show_menu; >+extern int quiet_boot; > extern int grub_timeout; > > void init_builtins (void); >diff -Naur grub-0.97.orig/stage2/stage2.c grub-0.97/stage2/stage2.c >--- grub-0.97.orig/stage2/stage2.c 2005-03-19 12:51:57.000000000 -0500 >+++ grub-0.97/stage2/stage2.c 2006-07-08 07:37:35.000000000 -0400 >@@ -717,12 +717,15 @@ > > while (1) > { >+ if (!quiet_boot) >+ { > if (config_entries) > printf (" Booting \'%s\'\n\n", > get_entry (menu_entries, first_entry + entryno, 0)); > else > printf (" Booting command-list\n\n"); >- >+ } >+ > if (! cur_entry) > cur_entry = get_entry (config_entries, first_entry + entryno, 1); >
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 239760
: 154515 |
155232