From: Allison Henderson <allison.henderson@oracle.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, sandeen@redhat.com
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2 5/9] xfs_spaceman: print a nicer message when the file path isn't on an xfs
Date: Tue, 22 May 2018 20:58:46 -0700 [thread overview]
Message-ID: <cabdf0a3-b3db-8c13-3724-a048b8936664@oracle.com> (raw)
In-Reply-To: <20180523033117.GJ14384@magnolia>
Ok, looks good. Thx!
Reviewed by: Allison Henderson <allison.henderson@oracle.com>
On 05/22/2018 08:31 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> If the file path passed in is not something on an xfs filesystem, print
> a nice message about that instead of yelling about ioctls.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> spaceman/file.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/spaceman/file.c b/spaceman/file.c
> index 4c13b4a8..23f8be1c 100644
> --- a/spaceman/file.c
> +++ b/spaceman/file.c
> @@ -69,7 +69,12 @@ openfile(
> }
>
> if (ioctl(fd, XFS_IOC_FSGEOMETRY, geom) < 0) {
> - perror("XFS_IOC_FSGEOMETRY");
> + if (errno == ENOTTY)
> + fprintf(stderr,
> +_("%s: Not on a mounted XFS filesystem.\n"),
> + path);
> + else
> + perror("XFS_IOC_FSGEOMETRY");
> close(fd);
> return -1;
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=LHZQ8fHvy6wDKXGTWcm97burZH5sQKHRDMaY1UthQxc&m=c2CCB3K_iIfSsLpTfhw0rxFL87ZYlPnPvGWzEfJ_t2E&s=KTX7FsHojy6HKAINeB5zGTNlqQlJ037Cw09OFK9tBhY&e=
>
next prev parent reply other threads:[~2018-05-23 3:59 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 2:45 [PATCH 0/9] xfsprogs-4.17: geometry refactoring Darrick J. Wong
2018-04-18 2:45 ` [PATCH 1/9] libfrog: move platform specific runtime support code out of libxfs Darrick J. Wong
2018-05-03 18:23 ` Eric Sandeen
2018-04-18 2:45 ` [PATCH 2/9] libfrog: refactor fs geometry printing function Darrick J. Wong
2018-05-03 18:47 ` Eric Sandeen
2018-05-03 21:27 ` Eric Sandeen
2018-05-03 21:35 ` Darrick J. Wong
2018-04-18 2:45 ` [PATCH 3/9] mkfs: use geometry generation / helper functions Darrick J. Wong
2018-05-03 18:52 ` Eric Sandeen
2018-04-18 2:45 ` [PATCH 4/9] xfs_db: add a superblock info command Darrick J. Wong
2018-05-03 20:53 ` Eric Sandeen
2018-05-03 21:44 ` Darrick J. Wong
2018-05-23 3:30 ` [PATCH v2 " Darrick J. Wong
2018-05-23 3:57 ` Allison Henderson
2018-04-18 2:46 ` [PATCH 5/9] xfs_spaceman: print a nicer message when the file path isn't on an xfs Darrick J. Wong
2018-05-03 20:57 ` Eric Sandeen
2018-05-23 3:31 ` [PATCH v2 " Darrick J. Wong
2018-05-23 3:58 ` Allison Henderson [this message]
2018-04-18 2:46 ` [PATCH 6/9] xfs_spaceman: add a superblock info command Darrick J. Wong
2018-05-03 21:09 ` Eric Sandeen
2018-05-03 21:39 ` Darrick J. Wong
2018-05-08 15:24 ` Darrick J. Wong
2018-05-23 3:32 ` [PATCH v2 " Darrick J. Wong
2018-05-23 4:08 ` Allison Henderson
2018-04-18 2:46 ` [PATCH 7/9] xfs_info: move to xfs_spaceman Darrick J. Wong
2018-05-03 21:17 ` Eric Sandeen
2018-05-03 21:48 ` Darrick J. Wong
2018-04-18 2:46 ` [PATCH 8/9] xfs_info: call xfs_db for offline filesystems Darrick J. Wong
2018-05-03 21:22 ` Eric Sandeen
2018-05-03 21:55 ` Darrick J. Wong
2018-05-23 3:33 ` [PATCH v2 " Darrick J. Wong
2018-05-23 4:36 ` Allison Henderson
2018-04-18 2:46 ` [PATCH 9/9] xfs_growfs: refactor geometry reporting Darrick J. Wong
2018-05-03 21:25 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cabdf0a3-b3db-8c13-3724-a048b8936664@oracle.com \
--to=allison.henderson@oracle.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.