git: 18eb15bd8a11 - stable/13 - makefs(8): do not print comma after the last super-block
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Apr 2023 14:22:17 UTC
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=18eb15bd8a11dc8e79b5a3de8629627d425b24db
commit 18eb15bd8a11dc8e79b5a3de8629627d425b24db
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2023-04-05 22:25:19 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-04-12 14:18:37 +0000
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)
---
usr.sbin/makefs/ffs/mkfs.c | 5 +++--
1 file 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");