From patchwork Mon Mar 14 00:27:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satoru Takeuchi X-Patchwork-Id: 8574551 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A56ABC0553 for ; Mon, 14 Mar 2016 00:28:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9B642044C for ; Mon, 14 Mar 2016 00:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D594220384 for ; Mon, 14 Mar 2016 00:28:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933052AbcCNA2J (ORCPT ); Sun, 13 Mar 2016 20:28:09 -0400 Received: from mgwkm04.jp.fujitsu.com ([202.219.69.171]:38525 "EHLO mgwkm04.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932298AbcCNA2H (ORCPT ); Sun, 13 Mar 2016 20:28:07 -0400 Received: from kw-mxoi1.gw.nic.fujitsu.com (unknown [192.168.231.131]) by mgwkm04.jp.fujitsu.com with smtp id 7791_4097_4c89f432_8597_432e_b905_35cb926239c4; Mon, 14 Mar 2016 09:27:59 +0900 Received: from m3050.s.css.fujitsu.com (msm.b.css.fujitsu.com [10.134.21.208]) by kw-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id E649AAC00FD for ; Mon, 14 Mar 2016 09:27:58 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.4.6 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20160122 X-SHieldMailCheckerMailID: 19abef89c4b9427f87f050f8049d4eff Subject: [PATCH 4/4] btrfs-progs: "device ready" accepts just one device To: "linux-btrfs@vger.kernel.org" References: <56E5FF9A.4020609@jp.fujitsu.com> From: Satoru Takeuchi Message-ID: <56E6056A.4020307@jp.fujitsu.com> Date: Mon, 14 Mar 2016 09:27:22 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56E5FF9A.4020609@jp.fujitsu.com> X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * actual result ======================================= # ./btrfs device ready /dev/sdb foo # ======================================= * expecting result ======================================= # ./btrfs device ready /dev/sdb foo btrfs device ready: too many arguments usage: btrfs device ready Check device to see if it has all of its devices in cache for mounting # ======================================= Signed-off-by: Satoru Takeuchi --- cmds-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-device.c b/cmds-device.c index 33da2ce..23656c3 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -326,7 +326,7 @@ static int cmd_device_ready(int argc, char **argv) clean_args_no_options(argc, argv, cmd_device_ready_usage); - if (check_argc_min(argc - optind, 1)) + if (check_argc_exact(argc - optind, 1)) usage(cmd_device_ready_usage); fd = open("/dev/btrfs-control", O_RDWR);