Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37512177
en ru br
ALT Linux repos
S:20230628-alt1

Group :: System/Kernel and hardware
RPM: acpica

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0031-Support-STAO-in-a-big-endian-world.patch
Download


From 63fc38478f12b8c8b0d263d25f72ff7538fba2ce Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Mon, 28 Sep 2020 11:49:42 -0600
Subject: [PATCH 31/40] Support STAO in a big-endian world
Signed-off-by: Al Stone <ahs3@redhat.com>
---
 source/common/dmtbdump3.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Index: acpica-unix2-20200925/source/common/dmtbdump3.c
===================================================================
--- acpica-unix2-20200925.orig/source/common/dmtbdump3.c
+++ acpica-unix2-20200925/source/common/dmtbdump3.c
@@ -285,14 +285,14 @@ AcpiDmDumpStao (
 {
     ACPI_STATUS             Status;
     char                    *Namepath;
-    UINT32                  Length = Table->Length;
+    UINT32                  TableLength = AcpiUtReadUint32(&Table->Length);
     UINT32                  StringLength;
     UINT32                  Offset = sizeof (ACPI_TABLE_STAO);
 
 
     /* Main table */
 
-    Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoStao);
+    Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoStao);
     if (ACPI_FAILURE (Status))
     {
         return;
@@ -300,7 +300,7 @@ AcpiDmDumpStao (
 
     /* The rest of the table consists of Namepath strings */
 
-    while (Offset < Table->Length)
+    while (Offset < TableLength)
     {
         Namepath = ACPI_ADD_PTR (char, Table, Offset);
         StringLength = strlen (Namepath) + 1;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin