From patchwork Wed Nov 6 10:49:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 3146321 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6E5BFBEEB2 for ; Wed, 6 Nov 2013 10:50:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 891AF204E2 for ; Wed, 6 Nov 2013 10:50:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E62D4204A9 for ; Wed, 6 Nov 2013 10:50:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932155Ab3KFKuO (ORCPT ); Wed, 6 Nov 2013 05:50:14 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:41945 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932075Ab3KFKuN (ORCPT ); Wed, 6 Nov 2013 05:50:13 -0500 Received: by mail-pa0-f43.google.com with SMTP id hz1so10318008pad.2 for ; Wed, 06 Nov 2013 02:50:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=CNrrmPZz3TMgSKvDMCKaGDyv0eDOjQgPR6hz5peBYSw=; b=BVIrsnhaLmIGR/VX3c3H58MkSgSqbpWY8PrbQzxLnjJtPyFJib+91N5TFQnUblMXaQ oK6m+hLgMpoYuNbvRbVk9xqZA2rHeYZfAvRMSd3i9Cwkpjbkt+FOQW11j5oQo40Lp35a WlcXL5Uhyx6u6Yu6/g4eZscbM5ibP/tNuohf+dAEl93JfHekbQtIdrKq+/Tq+2njoFAd Tye7hPEkDSo8iWA6QmuYa8XGo7Bcqb2/oc09v/rAZ2CrCvQxVy1SNvO2BVuoXFdF4Z5w 1n85HcTu98XNXiBaOnAwcoMdUrIKrdc5abhAv6t7CXzph4R4Ep2bxoRfq9x83wUXfcSQ gW8g== X-Received: by 10.68.137.103 with SMTP id qh7mr2482426pbb.175.1383735012267; Wed, 06 Nov 2013 02:50:12 -0800 (PST) Received: from localhost ([203.114.244.88]) by mx.google.com with ESMTPSA id i6sm40579169pbc.1.2013.11.06.02.50.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2013 02:50:11 -0800 (PST) From: Eryu Guan To: linux-btrfs@vger.kernel.org Cc: Eryu Guan Subject: [PATCH] Btrfs-progs: set return value to 0 if subvolume get-default successfully Date: Wed, 6 Nov 2013 18:49:12 +0800 Message-Id: <1383734952-11943-1-git-send-email-guaneryu@gmail.com> X-Mailer: git-send-email 1.8.3.1 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 cmd_subvol_get_default() returns 1 even if finds default subvolume successfully. Set the correct return value. Signed-off-by: Eryu Guan --- cmds-subvolume.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index f7249f8..8be6df7 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -691,6 +691,7 @@ static int cmd_subvol_get_default(int argc, char **argv) /* no need to resolve roots if FS_TREE is default */ if (default_id == BTRFS_FS_TREE_OBJECTID) { printf("ID 5 (FS_TREE)\n"); + ret = 0; goto out; }