Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2025 19:17:56 GMT
From:      Renato Botelho <garga@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e690b6519ae7 - main - bectl: Print activate message in a single line
Message-ID:  <202507011917.561JHud5040976@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by garga:

URL: https://cgit.FreeBSD.org/src/commit/?id=e690b6519ae70921b084d5df0e707abaf848d795

commit e690b6519ae70921b084d5df0e707abaf848d795
Author:     Renato Botelho <garga@FreeBSD.org>
AuthorDate: 2025-07-01 19:14:16 +0000
Commit:     Renato Botelho <garga@FreeBSD.org>
CommitDate: 2025-07-01 19:16:28 +0000

    bectl: Print activate message in a single line
    
    When -t parameter is used, bectl prints a complementary message "for
    next boot" on a second line.  Change it to print entire message on a
    single line.
    
    Reviewed by:    kevans
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D49439
---
 sbin/bectl/bectl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c
index 2ed365f93ad3..95715b34336b 100644
--- a/sbin/bectl/bectl.c
+++ b/sbin/bectl/bectl.c
@@ -158,13 +158,15 @@ bectl_cmd_activate(int argc, char *argv[])
 	/* activate logic goes here */
 	if ((err = be_activate(be, argv[0], temp)) != 0)
 		/* XXX TODO: more specific error msg based on err */
-		printf("Did not successfully activate boot environment %s\n",
+		printf("Did not successfully activate boot environment %s",
 		    argv[0]);
 	else
-		printf("Successfully activated boot environment %s\n", argv[0]);
+		printf("Successfully activated boot environment %s", argv[0]);
 
 	if (temp)
-		printf("for next boot\n");
+		printf(" for next boot");
+
+	printf("\n");
 
 	return (err);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507011917.561JHud5040976>