Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mN7Sl-0005c7-HB for mharc-grub-devel@gnu.org; Mon, 06 Sep 2021 01:46:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN7Sg-0005WT-6c for grub-devel@gnu.org; Mon, 06 Sep 2021 01:46:30 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:44019) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mN7Se-0004N5-JG for grub-devel@gnu.org; Mon, 06 Sep 2021 01:46:29 -0400 Received: by mail-pl1-x635.google.com with SMTP id v1so3242023plo.10 for ; Sun, 05 Sep 2021 22:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Icv9Y14dD8mpXZ6OXT7fv08Y/xq6CWFRDgi+uNXx4R0=; b=j7v7S+CI9Np7iIF5MNQ/cY7wGmhkKxctbIFlXCSYwMPsnE9H1sw1IpmEmQ4leYjd4b Gg8lfDUGAtKH+he1CCd8/9Xyny1C1REnjVGxRQM1Kd2Hu+t2aEtSDZBl5TLsu+7h4DMe rCL7Q2YwfClzjP8KLTJCzlNl3e0nixeUN6wB0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Icv9Y14dD8mpXZ6OXT7fv08Y/xq6CWFRDgi+uNXx4R0=; b=lYipB1g5ng3v6WvVTUeo6/0SrFIGwbcisxArv/Y8w+X6O2xYs9+NyZiIE7w+LYLlf9 +a0qSeBIUK3H9tp11i1r1XG7Qq4Z6Ts2zvsxSKcEpoXBy6dJgQgZoPZ6vU91TOr5MLFZ EmHEO9m0ir9dIMkmUtJISTcH7xXOt70aq4PFGA44b0OI8hQoAy041zVcOEL80IL3x0ot ZH8TO+zPE+gTmKS/9DNDbBU7t/jvQ9DLCYnLsQybCUzKGkPLnypFH5wWD480S9nOckHp /k2q/dm3qWMYFtV7GNP8utOlc7ymftqREnvnzEH8J5NxbKbyVxW49g5+/r+VfIuuuwSd DPUA== X-Gm-Message-State: AOAM530XzB+6GExBQOdX34mFzh8cDzJfLMtIjA8S4o/9GPc+oLAZH6cR sj8qMCFrrl3600zQen/o4jUz376uMv6Zjw== X-Google-Smtp-Source: ABdhPJxvBqoe3Rtgc9rbz9mjUGmA7CKOb+PDbfg/oJUQkpbcLuJCnIvtNO8wQPiQp6V+oTYv3Ivp3w== X-Received: by 2002:a17:902:e88c:b0:139:e71b:16bb with SMTP id w12-20020a170902e88c00b00139e71b16bbmr9364183plg.70.1630907187030; Sun, 05 Sep 2021 22:46:27 -0700 (PDT) Received: from localhost ([2001:4479:e200:df00:dadc:1c0c:1283:1cdb]) by smtp.gmail.com with ESMTPSA id b17sm7398381pgl.61.2021.09.05.22.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Sep 2021 22:46:26 -0700 (PDT) From: Daniel Axtens To: grub-devel@gnu.org Cc: Daniel Axtens Subject: [PATCH 3/5] powerpc: remove GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS Date: Mon, 6 Sep 2021 15:46:13 +1000 Message-Id: <20210906054615.217738-3-dja@axtens.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210906054615.217738-1-dja@axtens.net> References: <20210906054615.217738-1-dja@axtens.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=dja@axtens.net; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 05:46:30 -0000 Open Hack'Ware was the only user. Signed-off-by: Daniel Axtens --- grub-core/term/ieee1275/console.c | 15 ++++++--------- grub-core/video/ieee1275.c | 7 +++---- include/grub/ieee1275/ieee1275.h | 3 --- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/grub-core/term/ieee1275/console.c b/grub-core/term/ieee1275/console.c index 7e797a7d4445..ad2574d65086 100644 --- a/grub-core/term/ieee1275/console.c +++ b/grub-core/term/ieee1275/console.c @@ -171,6 +171,7 @@ static grub_err_t grub_console_init_output (struct grub_term_output *term) { grub_ssize_t actual; + unsigned col; /* The latest PowerMacs don't actually initialize the screen for us, so we * use this trick to re-open the output device (but we avoid doing this on @@ -184,16 +185,12 @@ grub_console_init_output (struct grub_term_output *term) return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot find stdout"); /* Initialize colors. */ - if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS)) - { - unsigned col; - for (col = 0; col < ARRAY_SIZE (colors); col++) - grub_ieee1275_set_color (stdout_ihandle, col, colors[col].red, - colors[col].green, colors[col].blue); + for (col = 0; col < ARRAY_SIZE (colors); col++) + grub_ieee1275_set_color (stdout_ihandle, col, colors[col].red, + colors[col].green, colors[col].blue); - /* Set the right fg and bg colors. */ - grub_terminfo_setcolorstate (term, GRUB_TERM_COLOR_NORMAL); - } + /* Set the right fg and bg colors. */ + grub_terminfo_setcolorstate (term, GRUB_TERM_COLOR_NORMAL); grub_console_dimensions (); diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c index 17a3dbbb5756..f437fb0dfab0 100644 --- a/grub-core/video/ieee1275.c +++ b/grub-core/video/ieee1275.c @@ -93,10 +93,9 @@ grub_video_ieee1275_init (void) grub_memset (&framebuffer, 0, sizeof(framebuffer)); - if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS) - && !grub_ieee1275_get_integer_property (grub_ieee1275_chosen, - "stdout", &stdout_ihandle, - sizeof (stdout_ihandle), &actual) + if (!grub_ieee1275_get_integer_property (grub_ieee1275_chosen, + "stdout", &stdout_ihandle, + sizeof (stdout_ihandle), &actual) && actual == sizeof (stdout_ihandle)) have_setcolors = 1; diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h index 17cfc898e3ee..3d0f21ce1173 100644 --- a/include/grub/ieee1275/ieee1275.h +++ b/include/grub/ieee1275/ieee1275.h @@ -106,9 +106,6 @@ enum grub_ieee1275_flag /* OLPC / XO firmware hangs when accessing USB devices. */ GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY, - /* Open Hack'Ware stops when trying to set colors */ - GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS, - /* Open Hack'Ware stops when grub_ieee1275_interpret is used. */ GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, -- 2.30.2