bin/164137: tunefs(8): issues inappropriate error-message
Andy Kosela
akosela at andykosela.com
Mon Dec 10 22:00:23 UTC 2012
The following reply was made to PR bin/164137; it has been noted by GNATS.
From: Andy Kosela <akosela at andykosela.com>
To: bugReporter at ib-haakh.de, bug-followup at freebsd.org
Cc:
Subject: Re: bin/164137: tunefs(8): issues inappropriate error-message
Date: Mon, 10 Dec 2012 15:59:23 -0600
This is a multi-part message in MIME format.
--=_50c65b3b.kudbgI0IVANaBd69u4co6wOfsqyZknQVRcRey7bXMvkWrS54
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
It seems that regression was introduced in r207421. The following patch
should get rid of that and also fix some extra spaces in tunefs.c.
--Andy
--=_50c65b3b.kudbgI0IVANaBd69u4co6wOfsqyZknQVRcRey7bXMvkWrS54
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="patch.txt"
Index: tunefs.c
===================================================================
--- tunefs.c (revision 244052)
+++ tunefs.c (working copy)
@@ -297,9 +297,8 @@
if (ufs_disk_fillout(&disk, special) == -1)
goto err;
if (disk.d_name != special) {
- if (statfs(special, &stfs) != 0)
- warn("Can't stat %s", special);
- if (strcmp(special, stfs.f_mntonname) == 0)
+ if (statfs(special, &stfs) == 0 &&
+ strcmp(special, stfs.f_mntonname) == 0)
active = 1;
}
@@ -865,7 +864,7 @@
if (ncnt <= 0)
return (-1);
cnt += ncnt;
- } else
+ } else
(*resid)--;
}
if (bwrite(&disk, fsbtodb(&sblock, blk), indirbuf,
@@ -1064,7 +1063,7 @@
{
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
"usage: tunefs [-A] [-a enable | disable] [-e maxbpg] [-f avgfilesize]",
-" [-J enable | disable] [-j enable | disable]",
+" [-J enable | disable] [-j enable | disable]",
" [-L volname] [-l enable | disable] [-m minfree]",
" [-N enable | disable] [-n enable | disable]",
" [-o space | time] [-p] [-s avgfpdir] [-t enable | disable]",
@@ -1081,13 +1080,13 @@
(sblock.fs_flags & FS_NFS4ACLS)? "enabled" : "disabled");
warnx("MAC multilabel: (-l) %s",
(sblock.fs_flags & FS_MULTILABEL)? "enabled" : "disabled");
- warnx("soft updates: (-n) %s",
+ warnx("soft updates: (-n) %s",
(sblock.fs_flags & FS_DOSOFTDEP)? "enabled" : "disabled");
- warnx("soft update journaling: (-j) %s",
+ warnx("soft update journaling: (-j) %s",
(sblock.fs_flags & FS_SUJ)? "enabled" : "disabled");
warnx("gjournal: (-J) %s",
(sblock.fs_flags & FS_GJOURNAL)? "enabled" : "disabled");
- warnx("trim: (-t) %s",
+ warnx("trim: (-t) %s",
(sblock.fs_flags & FS_TRIM)? "enabled" : "disabled");
warnx("maximum blocks per file in a cylinder group: (-e) %d",
sblock.fs_maxbpg);
--=_50c65b3b.kudbgI0IVANaBd69u4co6wOfsqyZknQVRcRey7bXMvkWrS54--
More information about the freebsd-bugs
mailing list