From nobody Tue Jan 24 22:11:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P1h5V6Ky6z3bfHB; Tue, 24 Jan 2023 22:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P1h5V5H4Nz4PF6; Tue, 24 Jan 2023 22:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rnAnbOMEKGvF7BlO9Qk/qGwHKe9bFLPWpnI0PQ2vOE4=; b=OfbR8uxg9dCo3bZIhPLQLdXPefo82e8vW9HTP3NC037cKHuvg2O124PSvYsc7gTsga4kKO YQTZ71crEqGbq9cVjVVi+WUE0vu+C6yxlZ9/cgsDfIiBqe3/Gf1lej0d1TDzUDVOW8xpqn JudPAEmu/9BS1slO7gNpyw+n/DUM909tFKzYZVjn0ZWS/VkKMcvMmCv+2eU6SsVoeMbedh IL/xePdA8tGvolHtxfAYl6dBpZHBNiNlB7C+Xe2L/JxT4YjhUtWZ5Ilmn5MIf/8B6EZWdQ EtCPyNMC4l5VE34JRuKWGezEB3IjK5P9gI7CEJP3eMk03FPhWhAsZ4sCLpUpSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rnAnbOMEKGvF7BlO9Qk/qGwHKe9bFLPWpnI0PQ2vOE4=; b=avB7yKxEb9iNROI4hf1+lGZN7gVtqTwER3NGtaSBEmIXd1bjbpT5q3MujnzftCqumfw6xl ViglnmMsWLepcCiLUv8dxRQVfN9cpMWbhiHBY1gYl0Z/vrhs0+GnYttaOzrtd4ooTXtRcD X8Ax4Ae3galBFTw20w0GxPi2K8q5bwIpB2ahiNdDlgZLkJIOmZiKgsWepj13wyQiWqYAMJ Ptnl1U7cGri7IrJPEG5nm4U7y8UBDbkGeUZOca0ghGD5fH4L/2sDVzmTKlvW5aelHYxITd Wdve9K09SWagr7q2azE6uFQ3ZLBl4lhi7b3CKbaAP6wISua8wzhhvXXEIGAWnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598302; a=rsa-sha256; cv=none; b=cxDJW1pcasI8IW5AMPLjYrwuRHDoZ7E0S8BDbJkFL8VGlW42aezjNxL0IyMV6ui80ChLLY JIVkzzg+dXNsADuNUphXZFhlIgYn2VYdDfsYecjW6n7QWNwmeqmJKjB4n9WMP9ur4QewlL 6aZ4pVByiOlhYWBMezAiRSTsdNzbEmj2+K8KDZ2UptwGZZIDkEvTWmYBRZ9zfToFUrMC1V kGpAgU4fgsYwJSKkY78Sx+FCBJfbHOv0rMLK1bnXDM5bF1s+fABCUzevmo1l3nsRwCZYeF aY9WcquM5v5ppfJ2+4BSA1Mb1Jka9hYY5Sp+95tx0/UpOZyMITLBpB5gipV0xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P1h5V4MFpzQFt; Tue, 24 Jan 2023 22:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30OMBgqh085096; Tue, 24 Jan 2023 22:11:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMBgdj085095; Tue, 24 Jan 2023 22:11:42 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:11:42 GMT Message-Id: <202301242211.30OMBgdj085095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: a8b253fced5e - stable/13 - stand: Move quit command to common commands List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a8b253fced5ef5a7af67c89ee715028b2853e560 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a8b253fced5ef5a7af67c89ee715028b2853e560 commit a8b253fced5ef5a7af67c89ee715028b2853e560 Author: Warner Losh AuthorDate: 2022-07-30 10:43:21 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:29 +0000 stand: Move quit command to common commands Since both EFI and the future kboot will benefit from a 'quit' command, move it from efi/loader/main.c to common/commands.c. In EFI this command exits back to the boot loader (which will cause the next BootXXXX in the BootOrder list to be attempted). In kboot, this will exit back to whatever called loader.kboot. In uboot this will cause a reset (which will restart uboot, not quite a simple exit, but will look similar) and in OFW it will execute OF_exit which should return to the openfirmware prompt. Sponsored by: Netflix [[ tweaked because mips is still in stable/13 leading to conflict ]] (cherry picked from commit 2101541ff1222788901d9503001add9f288a4c40) --- stand/common/commands.c | 9 +++++++++ stand/efi/loader/main.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/stand/common/commands.c b/stand/common/commands.c index e56d37c497b1..d109a2a8dbcf 100644 --- a/stand/common/commands.c +++ b/stand/common/commands.c @@ -578,3 +578,12 @@ command_readtest(int argc, char *argv[]) COMMAND_SET(readtest, "readtest", "Time a file read", command_readtest); #endif + +static int +command_quit(int argc, char *argv[]) +{ + exit(0); + return (CMD_OK); +} + +COMMAND_SET(quit, "quit", "exit the loader", command_quit); diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index e5f7b7820b4f..0a5a03765ddc 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1280,15 +1280,6 @@ command_reboot(int argc, char *argv[]) return (CMD_ERROR); } -COMMAND_SET(quit, "quit", "exit the loader", command_quit); - -static int -command_quit(int argc, char *argv[]) -{ - exit(0); - return (CMD_OK); -} - COMMAND_SET(memmap, "memmap", "print memory map", command_memmap); static int