From patchwork Tue Apr 11 12:15:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yauheni Kaliuta X-Patchwork-Id: 9675039 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F198860381 for ; Tue, 11 Apr 2017 12:12:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E992728565 for ; Tue, 11 Apr 2017 12:12:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE63D28569; Tue, 11 Apr 2017 12:12:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B6F128565 for ; Tue, 11 Apr 2017 12:12:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbdDKMMl (ORCPT ); Tue, 11 Apr 2017 08:12:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56670 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751951AbdDKMMl (ORCPT ); Tue, 11 Apr 2017 08:12:41 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B652A8047B; Tue, 11 Apr 2017 12:12:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B652A8047B Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=yauheni.kaliuta@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B652A8047B Received: from astarta.redhat.com (ovpn-117-212.ams2.redhat.com [10.36.117.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CCA47183BE; Tue, 11 Apr 2017 12:12:39 +0000 (UTC) From: Yauheni Kaliuta To: linux-modules Cc: Lucas De Marchi , Mark van Dijk Subject: [PATCH 1/4] libkmod: modinfo: fix sig_id output Date: Tue, 11 Apr 2017 15:15:00 +0300 Message-Id: <20170411121503.26181-2-yauheni.kaliuta@redhat.com> In-Reply-To: <20170411121503.26181-1-yauheni.kaliuta@redhat.com> References: <20170411121503.26181-1-yauheni.kaliuta@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 11 Apr 2017 12:12:40 +0000 (UTC) Sender: owner-linux-modules@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP For some reason the key for sig_id was set to "signature". The length was calculated against the proper string, as the result in the output it was truncated to "signat". Pass the proper key to the kmod_module_info_append() call. Signed-off-by: Yauheni Kaliuta --- libkmod/libkmod-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index 57da0a2d1147..34c7f76e4db5 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -2257,7 +2257,7 @@ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_ struct kmod_list *n; char *key_hex; - n = kmod_module_info_append(list, "signature", strlen("sig_id"), + n = kmod_module_info_append(list, "sig_id", strlen("sig_id"), sig_info.id_type, strlen(sig_info.id_type)); if (n == NULL) goto list_error;