From owner-svn-src-head@FreeBSD.ORG Sun Apr 21 20:51:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 41E631FC; Sun, 21 Apr 2013 20:51:54 +0000 (UTC) (envelope-from trociny@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 328CC120B; Sun, 21 Apr 2013 20:51:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3LKpsAq045273; Sun, 21 Apr 2013 20:51:54 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3LKpshn045272; Sun, 21 Apr 2013 20:51:54 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304212051.r3LKpshn045272@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 21 Apr 2013 20:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249741 - head/sbin/hastctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 20:51:54 -0000 Author: trociny Date: Sun Apr 21 20:51:53 2013 New Revision: 249741 URL: http://svnweb.freebsd.org/changeset/base/249741 Log: Remove code duplication. Modified: head/sbin/hastctl/hastctl.c Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Sun Apr 21 19:55:38 2013 (r249740) +++ head/sbin/hastctl/hastctl.c Sun Apr 21 20:51:53 2013 (r249741) @@ -504,18 +504,8 @@ main(int argc, char *argv[]) nv_add_string(nv, argv[ii + 1], "resource%d", ii); break; case CMD_LIST: - /* Obtain verbose status of the given resources. */ - nv = nv_alloc(); - nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); - if (argc == 0) - nv_add_string(nv, "all", "resource%d", 0); - else { - for (ii = 0; ii < argc; ii++) - nv_add_string(nv, argv[ii], "resource%d", ii); - } - break; case CMD_STATUS: - /* Obtain brief status of the given resources. */ + /* Obtain status of the given resources. */ nv = nv_alloc(); nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); if (argc == 0)