From patchwork Tue Feb 2 14:52:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 76386 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o12EquYd012944 for ; Tue, 2 Feb 2010 14:52:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753636Ab0BBOwy (ORCPT ); Tue, 2 Feb 2010 09:52:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49446 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739Ab0BBOwy (ORCPT ); Tue, 2 Feb 2010 09:52:54 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o12Eqrfh005391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Feb 2010 09:52:53 -0500 Received: from localhost.localdomain (vpn-10-147.rdu.redhat.com [10.11.10.147]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o12Eqrij016004 for ; Tue, 2 Feb 2010 09:52:53 -0500 Date: Tue, 2 Feb 2010 09:52:53 -0500 From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs-progs: make btrfsctl return values like everybody else Message-ID: <20100202145252.GA15957@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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.3 (demeter.kernel.org [140.211.167.41]); Tue, 02 Feb 2010 14:52:56 +0000 (UTC) diff --git a/btrfsctl.c b/btrfsctl.c index 66c4e89..73d9c30 100644 --- a/btrfsctl.c +++ b/btrfsctl.c @@ -231,9 +231,7 @@ int main(int ac, char **av) printf("ioctl failed with error %d\n", ret); } printf("%s\n", BTRFS_BUILD_VERSION); - if (ret) - exit(0); - else - exit(1); + + return ret ? 1 : 0; }