From patchwork Wed Sep 4 15:22:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 2853752 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B6EC69F4D4 for ; Wed, 4 Sep 2013 15:23:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DF6B201ED for ; Wed, 4 Sep 2013 15:23:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9F47204CB for ; Wed, 4 Sep 2013 15:23:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762918Ab3IDPXJ (ORCPT ); Wed, 4 Sep 2013 11:23:09 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:63111 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762901Ab3IDPXH (ORCPT ); Wed, 4 Sep 2013 11:23:07 -0400 Received: by mail-pb0-f41.google.com with SMTP id rp2so457009pbb.0 for ; Wed, 04 Sep 2013 08:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=++vpARv6F5jusBe9R05WH9xc7cGwn8yrvNnWKRTCVVI=; b=s1AK7+T3d6CB5fxYcOjNJVKfcxRRu9Q7IE5tHjERsNZF7S2QB68sF/n+9PkT7/WyUI np4mHFoFrzPaIwJkFAsN7o6FjCI6IFR54DFBETGmjIPZFtmy5aQdJWiXAO/qd3hPLvFN pGhTj1cMeiFgmBmo9z0JpmSwVBuiXrnzlkZF5lu23BxqjFto0XFyYGkRMioLM2WENU3I 7i5JH5RK+RFds7DJvVgTdXJk0fM045FLtKzeSjv6J2qQW+wVUHJ3eRUKE+4BRlzS8OZD vcClfWWcwx22k2Zv+G57NwZEHvEAEiOMJV1LjlR45Y338Sir0PzcOGqYXlWX0XyTHsrN 8ZtQ== X-Received: by 10.67.23.227 with SMTP id id3mr3929032pad.101.1378308186953; Wed, 04 Sep 2013 08:23:06 -0700 (PDT) Received: from localhost.localdomain.localdomain ([223.65.191.73]) by mx.google.com with ESMTPSA id uw6sm29467271pbc.8.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Sep 2013 08:23:06 -0700 (PDT) From: Wang Shilong To: linux-btrfs@vger.kernel.org Cc: dsterba@suse.cz, sandeen@redhat.com Subject: [PATCH 09/20] Btrfs-progs: fix magic return value in cmds-quota.c Date: Wed, 4 Sep 2013 23:22:26 +0800 Message-Id: <1378308157-4621-10-git-send-email-wangshilong1991@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1378308157-4621-1-git-send-email-wangshilong1991@gmail.com> References: <1378308157-4621-1-git-send-email-wangshilong1991@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-9.2 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 From: Wang Shilong Signed-off-by: Wang Shilong --- cmds-quota.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmds-quota.c b/cmds-quota.c index 94e3a5c..89cc89c 100644 --- a/cmds-quota.c +++ b/cmds-quota.c @@ -48,7 +48,7 @@ static int quota_ctl(int cmd, int argc, char **argv) fd = open_file_or_dir(path, &dirstream); if (fd < 0) { fprintf(stderr, "ERROR: can't access '%s'\n", path); - return 12; + return 1; } ret = ioctl(fd, BTRFS_IOC_QUOTA_CTL, &args); @@ -57,7 +57,7 @@ static int quota_ctl(int cmd, int argc, char **argv) if (ret < 0) { fprintf(stderr, "ERROR: quota command failed: %s\n", strerror(e)); - return 30; + return 1; } return 0; } @@ -132,7 +132,7 @@ static int cmd_quota_rescan(int argc, char **argv) if (ioctlnum != BTRFS_IOC_QUOTA_RESCAN && wait_for_completion) { fprintf(stderr, "ERROR: -w cannot be used with -s\n"); - return 12; + return 1; } if (check_argc_exact(argc - optind, 1)) @@ -144,7 +144,7 @@ static int cmd_quota_rescan(int argc, char **argv) fd = open_file_or_dir(path, &dirstream); if (fd < 0) { fprintf(stderr, "ERROR: can't access '%s'\n", path); - return 12; + return 1; } ret = ioctl(fd, ioctlnum, &args); @@ -160,7 +160,7 @@ static int cmd_quota_rescan(int argc, char **argv) if (ret < 0) { fprintf(stderr, "ERROR: quota rescan failed: " "%s\n", strerror(e)); - return 30; + return 1; } else { printf("quota rescan started\n"); }