From nobody Wed Feb 21 06:04:50 2024 X-Original-To: dev-commits-src-all@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 4Tfm2W35mxz5BXZK; Wed, 21 Feb 2024 06:04:51 +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 4Tfm2V70Lfz4nPv; Wed, 21 Feb 2024 06:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708495491; 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=SPzeNx+IMduEcE87qnMib71Poh9PBj43mQDoZYdDuEM=; b=kykbQdbd1ZvISGT6lsZCnoGsf/dCcnlusR8cBfQg6pCbrKl/6loxdHstEXq+oAb4DTGcm5 9h1+oWVH9a+v2NRMjNAR/fj3SxAt6wxgR1/aiSVruxFvOwgLJ/9zoqaKrRnAUO3qiMtRE7 xlGzAsmexcdZFTj4s3cm4Sm4E56frBWAwTPuk3bToHd6nBAsAIiHku0sDAKZLTGjM9BoG0 MAh1Fo5ZUdyRJb3vNmMHrWoUT18j+KN8j98ovx+Ua5ScacH03A8eNdCB9IudmTOcj2gCeU KuVMJBOIaXS714lDtpoWCJQHbgOQhIjZCpJ+TLQQGC3bbu+TpGbLaONXoS4L/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708495491; 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=SPzeNx+IMduEcE87qnMib71Poh9PBj43mQDoZYdDuEM=; b=N33+ssbRt9BvyyAOb/gRpRjxdi2Ed+4x7kx3h/oT002KMdZUNHK+lhoC6xvE80KO5+QaM2 lV9tt315LacK+kVwRljMgtgy0jYcX5jW/KKEgE4U8GVWAqRggp6iOPGm10MbQSnsTnRMb+ X6ji/OJmH4ezmWeWQaSZMmXCA6xzH9a/Ck0xa+73tHdiShR4oWexlw653Yv2LXWnSSpAhK lDw4/u2XjAtzroSFJw9SgKOTeU0lF5PHZu2pqcJY1A+eka7FkrhhNHTlbyD93hAnrldgyH UBBAGd1NMFtNEcrmovCe28nhIK4/fWwT2Vd9PcpGvXxpL+/9WbwaqTbBXkONWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708495491; a=rsa-sha256; cv=none; b=VB2PSskmnlJ4gu89rVS+GiZXTvNT3EapLG1GLe59GldqA3tfKCX/5A+diJpLa+ZOoJefKj S4hJJUM/H/WENnju0KOhGLlUgMSNIhhEjtN8h768f9eDMXtdIEOcOxupfntSW++6Hxmk1o yrHTtKNOfOetb4w/dQsZ1vqgHTvRg/HS1XNymQ9gpuvtGmEuE1E5bD7uFX+9IG6fC3SPjN ahEaYYN1KFqJIKuvaEnVESze+ZlAX8pBvU2Y+aiWnEBQjK/2Shz03dd1OnDVnb7q4sRoyv 8MRk7A5qQBpC6XMsPxaV1Y8VW2aJWjiSVh107+IZ8on0iHr0YG9NW5+KaB/H6g== 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 4Tfm2V64Gqzr82; Wed, 21 Feb 2024 06:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41L64oI7074165; Wed, 21 Feb 2024 06:04:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41L64oJ2074162; Wed, 21 Feb 2024 06:04:50 GMT (envelope-from git) Date: Wed, 21 Feb 2024 06:04:50 GMT Message-Id: <202402210604.41L64oJ2074162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 07cba2ddcb19 - main - reboot: Emulate nextboot -D better List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 07cba2ddcb196c6e595df26a49ec0d54b1f2efe1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=07cba2ddcb196c6e595df26a49ec0d54b1f2efe1 commit 07cba2ddcb196c6e595df26a49ec0d54b1f2efe1 Author: Warner Losh AuthorDate: 2024-02-21 06:03:15 +0000 Commit: Warner Losh CommitDate: 2024-02-21 06:04:56 +0000 reboot: Emulate nextboot -D better It used to produce no output when the file couldn't be removed. Emulate that better by unlinking and ignoring errors. It's used at the end of reboot always, even when the file isn't going to be there. Sponsored by: Netflix Fixes: 2c479548119a --- sbin/reboot/reboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index ac3927cc2432..e245c78d83bc 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -288,8 +288,7 @@ main(int argc, char *argv[]) errx(1, "-r and -k cannot be used together, there is no next kernel"); if (Dflag) { - if (unlink(PATH_NEXTBOOT) != 0) - err(1, "unlink %s", PATH_NEXTBOOT); + (void)unlink(PATH_NEXTBOOT); /* Say nothing if it's not there */ exit(0); }