From patchwork Mon Feb 25 14:03:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 2181111 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 51715DF230 for ; Mon, 25 Feb 2013 14:03:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759064Ab3BYODM (ORCPT ); Mon, 25 Feb 2013 09:03:12 -0500 Received: from mail-pb0-f48.google.com ([209.85.160.48]:39951 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758700Ab3BYODL (ORCPT ); Mon, 25 Feb 2013 09:03:11 -0500 Received: by mail-pb0-f48.google.com with SMTP id wy12so1677342pbc.21 for ; Mon, 25 Feb 2013 06:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=ZO10SVWKGLy+9BoPADCglHTHsrfbDp+XTqbnmoWWff4=; b=ghJmi0K37C4b9AC5BIGGiWgsDCNE4Fnu+z1IotWaFoowAg9JNS8A3b+ODJp4CdNWwh I8ISLUGPJdNZOf1nL/KL83KkT8t0PxdT0+VwjysGetyASSm04DAqO5Gbc1kyso9gN7rM fZ2zCPLCs93GL3v2kqa6Yy+RbVBfTWs/oaP4TNSbPh339UnK5xapfrt8oJVk27NUdyFV 8BAmYYx5d3kt5unKv6x/rBlGqc534ZbNF/57j+GgeKZ3SOVF8iZj0+fcDY9ikqXOP/nD duL9jR2Fac0kjTLJg4XX4v4zYZZwLWdBZShdKDljOP/ZqWl/qqlYDDCf8oQ5aYOJ0Kp5 Audg== X-Received: by 10.68.218.100 with SMTP id pf4mr17939988pbc.156.1361800990994; Mon, 25 Feb 2013 06:03:10 -0800 (PST) Received: from localhost.localdomain ([112.4.45.37]) by mx.google.com with ESMTPS id i6sm13830400paw.19.2013.02.25.06.03.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Feb 2013 06:03:10 -0800 (PST) From: Wang Shilong To: linux-btrfs@vger.kernel.org Cc: wangshilong1991@gmail.com Subject: [PATCH 3/4] Btrfs-progs: let the error messages more precise Date: Mon, 25 Feb 2013 22:03:06 +0800 Message-Id: <1361800986-2009-1-git-send-email-wangshilong1991@gmail.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Wang Shilong Not only the operation 'create/assign' may fail but also 'destroy/remove' operation, so add those operations in error messages. Signed-off-by: Wang Shilong --- cmds-qgroup.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 06505fa..e39ffac 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -65,8 +65,8 @@ static int qgroup_assign(int assign, int argc, char **argv) e = errno; close(fd); if (ret < 0) { - fprintf(stderr, "ERROR: unable to assign quota group: %s\n", - strerror(e)); + fprintf(stderr, "ERROR: unable to assign/remove " + "quota group: %s\n", strerror(e)); return 30; } return 0; @@ -102,8 +102,8 @@ static int qgroup_create(int create, int argc, char **argv) e = errno; close(fd); if (ret < 0) { - fprintf(stderr, "ERROR: unable to create quota group: %s\n", - strerror(e)); + fprintf(stderr, "ERROR: unable to create/destroy " + "quota group: %s\n", strerror(e)); return 30; } return 0;