diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-01 15:49:08 -0400 |
---|---|---|
committer | Eric Sandeen <sandeen@sandeen.net> | 2019-11-01 15:49:08 -0400 |
commit | 5770b2f08d4ce8bf0c2f1708ff3937fce4f202cd (patch) | |
tree | 685b8d73e839f681f57972274180833bbeea07ec | |
parent | eb20c4ca492bc89306a18ef6721f55e9f5616eaa (diff) | |
download | xfsprogs-dev-5770b2f08d4ce8bf0c2f1708ff3937fce4f202cd.tar.gz |
mkfs: fix incorrect error message
If we encounter a failure while fixing the freelist during mkfs, we
shouldn't print a misleading message about space reservation. Fix it so
that we print something about what we were trying to do when the error
happened.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r-- | mkfs/xfs_mkfs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 10a40cd4cd..18338a6147 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -3481,8 +3481,11 @@ initialise_ag_freespace( libxfs_alloc_fix_freelist(&args, 0); libxfs_perag_put(args.pag); c = -libxfs_trans_commit(tp); - if (c) - res_failed(c); + if (c) { + errno = c; + perror(_("initializing AG free space list")); + exit(1); + } } /* |