From owner-svn-src-projects@freebsd.org Wed Jul 25 03:57:29 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30026103D3F6 for ; Wed, 25 Jul 2018 03:57:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAA5C8E035; Wed, 25 Jul 2018 03:57:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCE5D1513B; Wed, 25 Jul 2018 03:57:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6P3vSpu090297; Wed, 25 Jul 2018 03:57:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P3vSGE090296; Wed, 25 Jul 2018 03:57:28 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807250357.w6P3vSGE090296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 25 Jul 2018 03:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r336702 - projects/bectl/sbin/bectl X-SVN-Group: projects X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: projects/bectl/sbin/bectl X-SVN-Commit-Revision: 336702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2018 03:57:29 -0000 Author: kevans Date: Wed Jul 25 03:57:28 2018 New Revision: 336702 URL: https://svnweb.freebsd.org/changeset/base/336702 Log: bectl(8): Rename error messages Modified: projects/bectl/sbin/bectl/bectl.c Modified: projects/bectl/sbin/bectl/bectl.c ============================================================================== --- projects/bectl/sbin/bectl/bectl.c Wed Jul 25 03:50:01 2018 (r336701) +++ projects/bectl/sbin/bectl/bectl.c Wed Jul 25 03:57:28 2018 (r336702) @@ -136,7 +136,7 @@ bectl_cmd_activate(int argc, char *argv[]) temp = true; break; default: - fprintf(stderr, "be activate: unknown option '-%c'\n", + fprintf(stderr, "bectl activate: unknown option '-%c'\n", optopt); return (usage(false)); } @@ -146,7 +146,7 @@ bectl_cmd_activate(int argc, char *argv[]) argv += optind; if (argc != 1) { - fprintf(stderr, "be activate: wrong number of arguments\n"); + fprintf(stderr, "bectl activate: wrong number of arguments\n"); return (usage(false)); } @@ -185,7 +185,7 @@ bectl_cmd_create(int argc, char *argv[]) snapname = optarg; break; default: - fprintf(stderr, "be create: unknown option '-%c'\n", + fprintf(stderr, "bectl create: unknown option '-%c'\n", optopt); return (usage(false)); } @@ -195,13 +195,12 @@ bectl_cmd_create(int argc, char *argv[]) argv += optind; if (argc != 1) { - fprintf(stderr, "be create: wrong number of arguments\n"); + fprintf(stderr, "bectl create: wrong number of arguments\n"); return (usage(false)); } bootenv = *argv; - if (snapname != NULL) { if (strchr(snapname, '@') != NULL) { err = be_create_from_existing_snap(be, bootenv, @@ -251,19 +250,19 @@ bectl_cmd_export(int argc, char *argv[]) if (argc == 1) { - fprintf(stderr, "be export: missing boot environment name\n"); + fprintf(stderr, "bectl export: missing boot environment name\n"); return (usage(false)); } if (argc > 2) { - fprintf(stderr, "be export: extra arguments provided\n"); + fprintf(stderr, "bectl export: extra arguments provided\n"); return (usage(false)); } bootenv = argv[1]; if (isatty(STDOUT_FILENO)) { - fprintf(stderr, "be export: must redirect output\n"); + fprintf(stderr, "bectl export: must redirect output\n"); return (EX_USAGE); } @@ -281,20 +280,20 @@ bectl_cmd_import(int argc, char *argv[]) if (argc == 1) { - fprintf(stderr, "be import: missing boot environment name\n"); + fprintf(stderr, "bectl import: missing boot environment name\n"); return (usage(false)); } if (argc > 2) { - fprintf(stderr, "be import: extra arguments provided\n"); + fprintf(stderr, "bectl import: extra arguments provided\n"); return (usage(false)); } bootenv = argv[1]; if (isatty(STDIN_FILENO)) { - fprintf(stderr, "be import: input can not be from terminal\n"); + fprintf(stderr, "bectl import: input can not be from terminal\n"); return (EX_USAGE); } @@ -310,7 +309,7 @@ bectl_cmd_add(int argc, char *argv[]) char *bootenv; if (argc < 2) { - fprintf(stderr, "be add: must provide at least one path\n"); + fprintf(stderr, "bectl add: must provide at least one path\n"); return (usage(false)); } @@ -338,7 +337,7 @@ bectl_cmd_destroy(int argc, char *argv[]) force = true; break; default: - fprintf(stderr, "be destroy: unknown option '-%c'\n", + fprintf(stderr, "bectl destroy: unknown option '-%c'\n", optopt); return (usage(false)); } @@ -348,7 +347,7 @@ bectl_cmd_destroy(int argc, char *argv[]) argv += optind; if (argc != 1) { - fprintf(stderr, "be destroy: wrong number of arguments\n"); + fprintf(stderr, "bectl destroy: wrong number of arguments\n"); return (usage(false)); } @@ -371,11 +370,11 @@ bectl_cmd_jail(int argc, char *argv[]) //struct jail be_jail = { 0 }; if (argc == 1) { - fprintf(stderr, "be jail: missing boot environment name\n"); + fprintf(stderr, "bectl jail: missing boot environment name\n"); return (usage(false)); } if (argc > 2) { - fprintf(stderr, "be jail: too many arguments\n"); + fprintf(stderr, "bectl jail: too many arguments\n"); return (usage(false)); } @@ -440,7 +439,7 @@ bectl_cmd_list(int argc, char *argv[]) show_space = true; break; default: - fprintf(stderr, "be list: unknown option '-%c'\n", + fprintf(stderr, "bectl list: unknown option '-%c'\n", optopt); return (usage(false)); } @@ -449,7 +448,7 @@ bectl_cmd_list(int argc, char *argv[]) argc -= optind; if (argc != 0) { - fprintf(stderr, "be list: extra argument provided\n"); + fprintf(stderr, "bectl list: extra argument provided\n"); return (usage(false)); } @@ -468,12 +467,12 @@ bectl_cmd_mount(int argc, char *argv[]) char *mountpoint; if (argc < 2) { - fprintf(stderr, "be mount: missing argument(s)\n"); + fprintf(stderr, "bectl mount: missing argument(s)\n"); return (usage(false)); } if (argc > 3) { - fprintf(stderr, "be mount: too many arguments\n"); + fprintf(stderr, "bectl mount: too many arguments\n"); return (usage(false)); } @@ -506,12 +505,12 @@ bectl_cmd_rename(int argc, char *argv[]) int err; if (argc < 3) { - fprintf(stderr, "be rename: missing argument\n"); + fprintf(stderr, "bectl rename: missing argument\n"); return (usage(false)); } if (argc > 3) { - fprintf(stderr, "be rename: too many arguments\n"); + fprintf(stderr, "bectl rename: too many arguments\n"); return (usage(false)); } @@ -549,7 +548,7 @@ bectl_cmd_unjail(int argc, char *argv[]) force = true; break; default: - fprintf(stderr, "be %s: unknown option '-%c'\n", + fprintf(stderr, "bectl %s: unknown option '-%c'\n", cmd, optopt); return (usage(false)); } @@ -559,7 +558,7 @@ bectl_cmd_unjail(int argc, char *argv[]) argv += optind; if (argc != 1) { - fprintf(stderr, "be %s: wrong number of arguments\n", cmd); + fprintf(stderr, "bectl %s: wrong number of arguments\n", cmd); return (usage(false)); } @@ -587,7 +586,7 @@ bectl_cmd_unmount(int argc, char *argv[]) flags |= BE_MNT_FORCE; break; default: - fprintf(stderr, "be %s: unknown option '-%c'\n", + fprintf(stderr, "bectl %s: unknown option '-%c'\n", cmd, optopt); return (usage(false)); } @@ -597,7 +596,7 @@ bectl_cmd_unmount(int argc, char *argv[]) argv += optind; if (argc != 1) { - fprintf(stderr, "be %s: wrong number of arguments\n", cmd); + fprintf(stderr, "bectl %s: wrong number of arguments\n", cmd); return (usage(false)); }