# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/grub/revert-diskio-verbosity.patch # Copyright (C) 2008 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-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; }