From patchwork Tue Jul 3 06:34:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Kerr X-Patchwork-Id: 938408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41KZF61Vy0z9s29 for ; Tue, 3 Jul 2018 16:38:02 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="ZGWXWQiw"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41KZF56yXhzF1LS for ; Tue, 3 Jul 2018 16:38:01 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="ZGWXWQiw"; dkim-atps=neutral X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41KZDH2nFgzF1LZ for ; Tue, 3 Jul 2018 16:37:19 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="ZGWXWQiw"; dkim-atps=neutral Received: by ozlabs.org (Postfix, from userid 1023) id 41KZDG3vgGz9s3x; Tue, 3 Jul 2018 16:37:17 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1530599838; bh=DqSSfhlgIEFFL7LYZxIQ/f8/j4v8cBLiW3dqg9+FPS4=; h=From:To:Cc:Subject:Date:From; b=ZGWXWQiwv5q/qARzZZPCRjVCtDZgKkrXv8cH7N8kRDUdHqw9VMTDF5JRwf9D9IRzo iACr0utNPjlioQd5muZInL7KBAe56zYONV/ZvX/fwi4DyvZQT59ZY90cLkkziRFldh d/lBoU3vZ3d7fdglzHVsewlSDkQprbCrz2rW4qQ0JrZ8p6JFhEDrY+h1iI1Av69tb7 IBqn5NipXaRyJPIWr8yKvvcsuO7GUHOEvFtIzyxW+9TSE4SWJdr3PX+PptgitI+LYK 4jS04+OtMz8uZaAZ411YHWGTKPSqj6o0zpZM1qATO81eLUZJovS/vxGX0AZJQ6N7nZ 0AvAn4TLyJwvQ== From: Jeremy Kerr To: petitboot@lists.ozlabs.org Subject: [PATCH 0/5] Implement a set of hotkeys for temporary autoboot override Date: Tue, 3 Jul 2018 16:34:42 +1000 Message-Id: <20180703063447.8338-1-jk@ozlabs.org> X-Mailer: git-send-email 2.14.1 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yewei@inspur.com MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" This series implements a set of function keys to temporarily apply an autoboot policy (ie, only boot from certain device types). These mappings are: F10: Only autoboot from disk F11: Only autoboot from USB devices F12: Only autoboot from network One quirk of these keys is that they need to *not* interrupt the autoboot process (unlike all existing key inputs). Jeremy Kerr (5): protocol: Add definition and serialisation for temporary autoboot discover/handler: Split autoboot matching into a new function discover/handler: Implement temporary autoboot messages ui/ncurses: Implement non-boot-cancelling keys ui/ncurses: Implement F10-F12 for autoboot device control discover/device-handler.c | 122 +++++++++++++++++++++++++++++++++++------- discover/device-handler.h | 2 + discover/discover-server.c | 16 ++++++ lib/pb-protocol/pb-protocol.c | 70 ++++++++++++++++++++++++ lib/pb-protocol/pb-protocol.h | 6 +++ ui/common/discover-client.c | 18 +++++++ ui/common/discover-client.h | 4 ++ ui/ncurses/nc-cui-help.c | 9 ++++ ui/ncurses/nc-cui.c | 65 +++++++++++++++++++++- ui/ncurses/nc-cui.h | 1 + 10 files changed, 292 insertions(+), 21 deletions(-)