[Replicant] [libsamsung-ipc][PATCH 4/6] ipc_device_detect: document the code that finds the board name.

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Thu Feb 6 16:26:31 UTC 2020


Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 samsung-ipc/ipc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 39caf0b..52c4b90 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -76,7 +76,10 @@ int ipc_device_detect(void)
     line = strtok(buffer, "\n");
     while (line != NULL) {
         if (strncmp(line, "Hardware", 8) == 0) {
-            p = line + 11;
+            /* In arch/arm/kernel/setup.c, Linux does the following:
+             * seq_printf(m, "Hardware\t: %s\n", machine_name);
+             */
+            p = line + 8 + 3;
             c = p;
 
             while (*c != '\n' && *c != '\0') {
-- 
2.25.0



More information about the Replicant mailing list