From patchwork Sun Dec 19 22:29:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gamari X-Patchwork-Id: 419131 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBJMTo8M010698 for ; Sun, 19 Dec 2010 22:29:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932403Ab0LSW3s (ORCPT ); Sun, 19 Dec 2010 17:29:48 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:46519 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932260Ab0LSW3r (ORCPT ); Sun, 19 Dec 2010 17:29:47 -0500 Received: by vws16 with SMTP id 16so1091947vws.19 for ; Sun, 19 Dec 2010 14:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=sJOZQF6iax9UiI1EEzFO3ipK1ySjWYCUsQzURl0Y7b0=; b=sFLjk4iRhsK/R9zIdBwLBBbh/L7anKTl9I4xLqQaojiA+f3oQYLbCkNThSDWfPMwyA 7elqW56EsHze0omGKJorz/Bo/3TcVEANWR6a0eBOz4CiFNVeu7haLJ/zsV6q2WsnM3b2 lw8D896c1pIG/0w6d7AG09RC+eOAXanfsSoEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=pGzoXvvViDILe8AkdZ3plYjUGXsRc+lcBjM/YUltezt61Kqc9XLSOGuGUOU5CXJjed rQMCCpVlZWu6NRTEmHNrowuBtWD676DnDhIsscdnd2f3c79Iei4hqBN7RJGOR1aI3LYM L/2NWequGwjMkjF2rWqOJ8f0NH8nPAkUthkbE= Received: by 10.220.203.132 with SMTP id fi4mr1038491vcb.125.1292797786926; Sun, 19 Dec 2010 14:29:46 -0800 (PST) Received: from ben-laptop (c-24-61-223-13.hsd1.nh.comcast.net [24.61.223.13]) by mx.google.com with ESMTPS id i1sm785853vby.1.2010.12.19.14.29.45 (version=SSLv3 cipher=RC4-MD5); Sun, 19 Dec 2010 14:29:46 -0800 (PST) From: Ben Gamari To: linux-btrfs@vger.kernel.org Cc: Ben Gamari Subject: [PATCH] Improve error handling in filesystem df Date: Sun, 19 Dec 2010 17:29:41 -0500 Message-Id: <1292797781-3877-1-git-send-email-bgamari.foss@gmail.com> X-Mailer: git-send-email 1.7.1 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 (demeter1.kernel.org [140.211.167.41]); Sun, 19 Dec 2010 22:29:51 +0000 (UTC) diff --git a/btrfs_cmds.c b/btrfs_cmds.c index 8031c58..45da2bd 100644 --- a/btrfs_cmds.c +++ b/btrfs_cmds.c @@ -857,6 +857,7 @@ int do_df_filesystem(int nargs, char **argv) ret = ioctl(fd, BTRFS_IOC_SPACE_INFO, sargs); if (ret) { + fprintf(stderr, "ERROR: can't query '%s' for free space (%s)\n", path, strerror(-ret)); free(sargs); return ret; } @@ -875,6 +876,7 @@ int do_df_filesystem(int nargs, char **argv) ret = ioctl(fd, BTRFS_IOC_SPACE_INFO, sargs); if (ret) { + fprintf(stderr, "ERROR: can't query '%s' for free space (%s)\n", path, strerror(-ret)); free(sargs); return ret; }