diff options
author | Christos Margiolis <christos@FreeBSD.org> | 2023-04-05 22:25:19 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2023-04-12 14:18:37 +0000 |
commit | 18eb15bd8a11dc8e79b5a3de8629627d425b24db (patch) | |
tree | 0cef18ed4b55846a44a7e216068d46a939d207ca | |
parent | 37ef513a3c08a533b78c64125b4b3d78cb00963f (diff) | |
download | src-18eb15bd8a11dc8e79b5a3de8629627d425b24db.tar.gz src-18eb15bd8a11dc8e79b5a3de8629627d425b24db.zip |
makefs(8): do not print comma after the last super-block
Reviewed by: markj, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39430
(cherry picked from commit f21faa67ab6bfe1acb0073287396b232fb11d05e)
-rw-r--r-- | usr.sbin/makefs/ffs/mkfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c index 0f8b040d6997..ef745fe3c196 100644 --- a/usr.sbin/makefs/ffs/mkfs.c +++ b/usr.sbin/makefs/ffs/mkfs.c @@ -529,8 +529,9 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts, time_t tstamp) initcg(cylno, tstamp, fsopts); if (cylno % nprintcols == 0) printf("\n"); - printf(" %*lld,", printcolwidth, - (long long)fsbtodb(&sblock, cgsblock(&sblock, cylno))); + printf(" %*lld%s", printcolwidth, + (long long)fsbtodb(&sblock, cgsblock(&sblock, cylno)), + cylno == sblock.fs_ncg - 1 ? "" : ","); fflush(stdout); } printf("\n"); |