From patchwork Thu Jun 30 12:34:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephane Chazelas X-Patchwork-Id: 932692 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5UCYn8f004048 for ; Thu, 30 Jun 2011 12:34:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751396Ab1F3Meq (ORCPT ); Thu, 30 Jun 2011 08:34:46 -0400 Received: from mail.seebyte.com ([80.193.213.29]:49840 "EHLO mail.seebyte.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031Ab1F3Meq (ORCPT ); Thu, 30 Jun 2011 08:34:46 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.seebyte.com (Postfix) with ESMTP id 2979B2E29; Thu, 30 Jun 2011 13:34:45 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at mail.seebyte.com Received: from mail.seebyte.com ([127.0.0.1]) by localhost (seebyte2.seebyte.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iE1jLmumeRdK; Thu, 30 Jun 2011 13:34:39 +0100 (BST) Received: from sbl-sc-laptop1.seebyte.com (stephane-chazelas-laptop1.seebyte.com [10.10.10.4]) by mail.seebyte.com (Postfix) with ESMTPSA id EB1882E24; Thu, 30 Jun 2011 13:34:38 +0100 (BST) Received: from stephane by sbl-sc-laptop1.seebyte.com with local (Exim 4.76) (envelope-from ) id 1QcGS6-0007Ce-LF; Thu, 30 Jun 2011 13:34:38 +0100 Date: Thu, 30 Jun 2011 13:34:38 +0100 From: Stephane Chazelas To: Hugo Mills Cc: linux-btrfs@vger.kernel.org Subject: [PATCH] [btrfs-progs integration] incorrect argument checking for "btrfs sub snap -r" Message-ID: References: <4E0BC7AA.7000709@cn.fujitsu.com> <4E0C3F72.5040508@gmail.com> <20110630105813.GD11170@carfax.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110630105813.GD11170@carfax.org.uk> User-Agent: Mutt/1.5.16 (2007-09-19) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Jun 2011 12:34:49 +0000 (UTC) Looks like this was missing in integration-20110626 for the readonly snapshot patch: Without that, "btrfs sub snap -r x y" would fail as it's not *2* arguments. diff --git a/btrfs.c b/btrfs.c index e117172..be6ece5 100644 --- a/btrfs.c +++ b/btrfs.c @@ -49,7 +49,7 @@ static struct Command commands[] = { /* avoid short commands different for the case only */ - { do_clone, 2, + { do_clone, -1, "subvolume snapshot", "[-r] [/]\n" "Create a writable/readonly snapshot of the subvolume with\n" "the name in the directory.",