From patchwork Thu Oct 21 09:16:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1544228 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=TAWWvI1G; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HZhgs5VfFz9sRR for ; Thu, 21 Oct 2021 20:16:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6DA2A83374; Thu, 21 Oct 2021 11:16:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="TAWWvI1G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F83B833D5; Thu, 21 Oct 2021 11:16:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B2614831F5 for ; Thu, 21 Oct 2021 11:16:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from workstation5.fritz.box (ip-88-152-144-157.hsi03.unitymediagroup.de [88.152.144.157]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 48B0E3F365; Thu, 21 Oct 2021 09:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1634807801; bh=WLc9tMaIAZvFJSBHP50d4Z3hZCCqE+elOCartrbkltE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=TAWWvI1GKNAA7Q7Jc+PXOBp9CZqMdmi0FMpL3RzTlRizLHDwxy3WklOH6joVkxAtN /aZ3hrFMDgDNANLLH3RS5MMEqQhf31rvt1l2eLc/Ew0hK8Zbpj+Fl9fEPAIim9UvGt rk0UJJz+inITW26+TZyi4K2tTkAoKD2rGQ3jbXagnQoMJMYK2Hh7QfiGp0/mI8Zrck 87s5BG7Q5jQh9wlpIEJOnd/2LjUwgXPGP4HtI89S+IontyutUd+nPNj9DQGaxmuZx0 kEpLJCdhoCHEgmrXDbDLwUPEnCiy9qfjSeZ1GaTAr1Dc/MktCu33X/5aG7ZACae4fg QzpPoPkThOAdg== From: Heinrich Schuchardt To: Simon Glass Cc: Bin Meng , Masahisa Kojima , Christian Gmeiner , Ilias Apalodimas , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 1/1] smbios: amend the description of smbios_string() Date: Thu, 21 Oct 2021 11:16:31 +0200 Message-Id: <20211021091631.13500-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Add a warning that this function only works for strings preceding the first non-string field. Signed-off-by: Heinrich Schuchardt --- include/smbios.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/smbios.h b/include/smbios.h index aa6b6f3849..b7a1b8e412 100644 --- a/include/smbios.h +++ b/include/smbios.h @@ -258,6 +258,10 @@ const struct smbios_header *smbios_header(const struct smbios_entry *entry, int /** * smbios_string() - Return string from SMBIOS * + * This function counts the zero bytes at the end of strings to identify the + * string to retrieve. This only works up to the first non-string field in the + * table. + * * @header: pointer to struct smbios_header * @index: string index * @return: NULL or a valid const char pointer