# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../grub/revert-diskio-verbosity.patch # Copyright (C) 2008 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- Our imported patches introduce some multi config file auto-probe code-path that results in multiple "Previous try failed, trying ..." "debug" prints on the screen that distract humble watchers. - Rene Rebe --- grub-0.97/stage2/disk_io.c 2008-11-24 15:32:56.000000000 +0000 +++ grub-0.97/stage2/disk_io.c 2004-05-23 16:35:24.000000000 +0000 @@ -1638,28 +1537,6 @@ int grub_open (char *filename) { -#ifndef STAGE1_5 - const int buf_size = 1500; - const char *try_filenames[] = { "menu.lst", "m" }; - char fn[buf_size]; /* arbitrary... */ - char *filename_orig = filename; - int trycount = 0; - - if (grub_strlen(filename) > buf_size) - { - printf("Buffer overflow: %s(%d)\n", __FILE__, __LINE__); - while (1) {} - } - - /* initially, we need to copy filename to fn */ - grub_strcpy(fn, filename_orig); - fn[grub_strlen(filename_orig)] = 0; - -restart: - errnum = 0; /* hrm... */ - filename = fn; -#endif - #ifndef NO_DECOMPRESSION compressed_file = 0; #endif /* NO_DECOMPRESSION */ @@ -1669,12 +1546,7 @@ filepos = 0; if (!(filename = setup_part (filename))) - { - if (errnum == ERR_FILE_NOT_FOUND) - goto retry; - else - return 0; - } + return 0; #ifndef NO_BLOCK_FILES block_file = 0; @@ -1768,29 +1640,6 @@ #endif /* NO_DECOMPRESSION */ } -retry: -# ifndef STAGE1_5 - if (trycount < sizeof(try_filenames) / sizeof(*try_filenames)) - { - unsigned int l = grub_strlen(filename_orig); - unsigned int ll = grub_strlen(try_filenames[trycount]); - int j; - - grub_memmove(fn, filename_orig, l); - - if (filename_orig[l - 1] != '/') - fn[l++] = '/'; - for (j = 0; j < ll; j++) - fn[l + j] = try_filenames[trycount][j]; - fn[l + ll] = 0; - - grub_printf("Previous try failed, trying \"%s\"\n", fn); - trycount++; - goto restart; - } -# endif - - return 0; }