From owner-svn-src-all@FreeBSD.ORG Mon May 27 13:51:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EED2378D; Mon, 27 May 2013 13:51:57 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E0D3E3DC; Mon, 27 May 2013 13:51:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4RDpvSg013329; Mon, 27 May 2013 13:51:57 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4RDpvar013326; Mon, 27 May 2013 13:51:57 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201305271351.r4RDpvar013326@svn.freebsd.org> From: Dmitry Morozovsky Date: Mon, 27 May 2013 13:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r251026 - in stable/8: . sbin/hastctl X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2013 13:51:58 -0000 Author: marck (doc committer) Date: Mon May 27 13:51:57 2013 New Revision: 251026 URL: http://svnweb.freebsd.org/changeset/base/251026 Log: Preparation for MFC revs r248291 and r249741: Add 'list' command, for now the exact equivalent of 'status', so users of the latter could change their scripts. This is direct commit to stable, and is temporary. Requested by: Pete French Approved by: trociny 2B cleaned after: 6 weeks Modified: stable/8/UPDATING stable/8/sbin/hastctl/hastctl.8 stable/8/sbin/hastctl/hastctl.c Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Mon May 27 13:49:55 2013 (r251025) +++ stable/8/UPDATING Mon May 27 13:51:57 2013 (r251026) @@ -15,6 +15,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20130524: + `list' command has been added to hastctl(8). For now, it is full + equivalent of `status' command. + WARNING: in the near future the output of hastctl's status command + will change to more terse format. If you use `hastctl status' + for parsing in your scripts, switch to `hastctl list'. + 20130429: Fix a bug that allows NFS clients to issue READDIR on files. Modified: stable/8/sbin/hastctl/hastctl.8 ============================================================================== --- stable/8/sbin/hastctl/hastctl.8 Mon May 27 13:49:55 2013 (r251025) +++ stable/8/sbin/hastctl/hastctl.8 Mon May 27 13:51:57 2013 (r251026) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2011 +.Dd May 24, 2013 .Dt HASTCTL 8 .Os .Sh NAME @@ -49,6 +49,11 @@ .Aq init | primary | secondary .Ar all | name ... .Nm +.Cm list +.Op Fl d +.Op Fl c Ar config +.Op Ar all | name ... +.Nm .Cm status .Op Fl d .Op Fl c Ar config @@ -139,8 +144,19 @@ GEOM provider .Pa /dev/hast/ will not be created on secondary node. .El +.It Cm list .It Cm status -Present status of the configured resources. +Present verbose status of the configured resources. +For now, list and status commands are equivalent. +In the near future the output of +.Nm +status command will change to more terse format. +If you use ` +.Nm +status' for parsing in your scripts, switch to ` +.Nm +list'. + .It Cm dump Dump metadata stored on local component for the configured resources. .El Modified: stable/8/sbin/hastctl/hastctl.c ============================================================================== --- stable/8/sbin/hastctl/hastctl.c Mon May 27 13:49:55 2013 (r251025) +++ stable/8/sbin/hastctl/hastctl.c Mon May 27 13:51:57 2013 (r251026) @@ -70,7 +70,8 @@ enum { CMD_CREATE, CMD_ROLE, CMD_STATUS, - CMD_DUMP + CMD_DUMP, + CMD_LIST }; static __dead2 void @@ -85,6 +86,9 @@ usage(void) " %s role [-d] [-c config] all | name ...\n", getprogname()); fprintf(stderr, + " %s list [-d] [-c config] [all | name ...]\n", + getprogname()); + fprintf(stderr, " %s status [-d] [-c config] [all | name ...]\n", getprogname()); fprintf(stderr, @@ -381,6 +385,9 @@ main(int argc, char *argv[]) } else if (strcmp(argv[1], "role") == 0) { cmd = CMD_ROLE; optstr = "c:dh"; + } else if (strcmp(argv[1], "list") == 0) { + cmd = CMD_LIST; + optstr = "c:dh"; } else if (strcmp(argv[1], "status") == 0) { cmd = CMD_STATUS; optstr = "c:dh"; @@ -469,6 +476,7 @@ main(int argc, char *argv[]) for (ii = 0; ii < argc - 1; ii++) nv_add_string(nv, argv[ii + 1], "resource%d", ii); break; + case CMD_LIST: case CMD_STATUS: /* Obtain status of the given resources. */ nv = nv_alloc(); @@ -524,6 +532,7 @@ main(int argc, char *argv[]) case CMD_ROLE: error = control_set_role(nv, argv[0]); break; + case CMD_LIST: case CMD_STATUS: error = control_status(nv); break;