From patchwork Tue Feb 5 08:16:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 10796987 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F2EB1805 for ; Tue, 5 Feb 2019 08:17:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C05A2B21C for ; Tue, 5 Feb 2019 08:17:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DBD62B27D; Tue, 5 Feb 2019 08:17:06 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F32672B21C for ; Tue, 5 Feb 2019 08:17:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AD9CD211C2831; Tue, 5 Feb 2019 00:17:05 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::42b; helo=mail-pf1-x42b.google.com; envelope-from=oohall@gmail.com; receiver=linux-nvdimm@lists.01.org Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DEEA92194D387 for ; Tue, 5 Feb 2019 00:17:03 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id g62so1145055pfd.12 for ; Tue, 05 Feb 2019 00:17:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RQthT22trFKTFkUr52M30ScmiiTuxRWA+Yre60/SnqU=; b=MKhZ+8IZvq7HbqDa7HhynzSSErhIRbGOjylUUmv9ogSzIAI+L4w1/YZh4mLS/hpRY+ IVQiuxvHYR6k62vU0Aq3h+nV3tE/BpcH63HNP6MmcVSvRYsRc6IqjzkS4bMLvRJlwb6h Jhq/UyMSJnjU+gUTlyXMzRIZSbOE7zaOWC21IfPLrgiUFE0949/ojv+NoIdn2LW/SMqi QaFJvK9O+2NMdi61G2ljnwZG/CGBXm30evSFykR0UrpDSJCP5VSpXJRucDklwUw1KqNG xA1DPFDwEhSmC8v1J0ZGHpSD/tN5zsKsSOBanCHMRZfMUjUXvdJNfXcGLI63ZAzdBN8t x8mQ== 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:mime-version :content-transfer-encoding; bh=RQthT22trFKTFkUr52M30ScmiiTuxRWA+Yre60/SnqU=; b=apSrBdOkje1Shch9tbxWgOz7kzn87E/KfrrcYHID1V60UM8FXKqHLMU+NbHc58xhb8 jQuOCd+fr5kCv0e5/hANZcwu1FW0XVUyD6gaT0okLsynXONMnmvvmizQlAZNJp+W3/hz Ugvs+geyNeyltVFgEnP9Wzwamb3qK55MfsU2M9ML/jT2dsR3//jlweBt48P0Hch53yOI SWSaPtS4i0qH3oc6h5xFODvrpSsLTymRnJdnhKwZ9MPdu4SHA+uJ1mL6G0gfBOiPaN/e wNYdJO+fGrYqzq25m2cOBt5OV3vi3IYTAswFTEsIjG3V5gt0lk41DL2fM60kFoRfEim1 1RdQ== X-Gm-Message-State: AHQUAuanOAuccSBYvZrQUqJO7QtmhnAFMyJlQD336r1nQiTB/D/7N6Fg bJQt0KSW9aVc67TB/fvOZ3U7JvS6 X-Google-Smtp-Source: AHgI3IbvDbnmpmgbL9wETkDpBbvPIH4e2uVswPCgBv5vk9NvzFCw7tLNnhq65iQIymu+dOa3shy0ww== X-Received: by 2002:a62:7086:: with SMTP id l128mr3753009pfc.68.1549354623062; Tue, 05 Feb 2019 00:17:03 -0800 (PST) Received: from wafer.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id b194sm3479363pga.45.2019.02.05.00.17.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Feb 2019 00:17:02 -0800 (PST) From: Oliver O'Halloran To: linux-nvdimm@lists.01.org Subject: [PATCH] ndctl: Fixes for building without keyutils Date: Tue, 5 Feb 2019 19:16:52 +1100 Message-Id: <20190205081652.29600-1-oohall@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Fixes for some build errors when ndctl is configured without keyutils support. Signed-off-by: Oliver O'Halloran --- Ran into this when making a test buildroot image. This is probably not going to be an issue if you're compiling on a real OS. --- ndctl/ndctl.c | 2 ++ ndctl/util/keys.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ndctl/ndctl.c b/ndctl/ndctl.c index b5c3bf884d65..bd333b292743 100644 --- a/ndctl/ndctl.c +++ b/ndctl/ndctl.c @@ -93,7 +93,9 @@ static struct cmd_struct commands[] = { { "remove-passphrase", { cmd_remove_passphrase } }, { "freeze-security", { cmd_freeze_security } }, { "sanitize-dimm", { cmd_sanitize_dimm } }, +#ifdef ENABLE_KEYUTILS { "load-keys", { cmd_load_keys } }, +#endif { "wait-overwrite", { cmd_wait_overwrite } }, { "list", { cmd_list } }, { "monitor", { cmd_monitor } }, diff --git a/ndctl/util/keys.h b/ndctl/util/keys.h index c4d57eae1afc..30687a136512 100644 --- a/ndctl/util/keys.h +++ b/ndctl/util/keys.h @@ -46,7 +46,7 @@ static inline int ndctl_dimm_remove_key(struct ndctl_dimm *dimm) } static inline int ndctl_dimm_secure_erase_key(struct ndctl_dimm *dimm, - enum ndctl_key_type key_type); + enum ndctl_key_type key_type) { return -EOPNOTSUPP; }