git: 1e904d6742bb - main - makefs: Remove redundant 'stampst' checks in several backends
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 May 2025 09:50:53 UTC
The branch main has been updated by bnovkov:
URL: https://cgit.FreeBSD.org/src/commit/?id=1e904d6742bbed99387cc6bcb00dc088192f65df
commit 1e904d6742bbed99387cc6bcb00dc088192f65df
Author: Bojan Novković <bnovkov@FreeBSD.org>
AuthorDate: 2025-04-01 11:12:39 +0000
Commit: Bojan Novković <bnovkov@FreeBSD.org>
CommitDate: 2025-05-20 09:50:27 +0000
makefs: Remove redundant 'stampst' checks in several backends
PR: 285630
Sponsored by: Klara, Inc.
Sponsored by: The FreeBSD Foundation
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D49601
---
usr.sbin/makefs/ffs.c | 6 ++++--
usr.sbin/makefs/msdos/msdosfs_vnops.c | 2 --
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
index 34a0f8a67497..4efcd20ad91a 100644
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -679,8 +679,9 @@ ffs_build_dinode1(struct ufs1_dinode *dinp, dirbuf_t *dbufp, fsnode *cur,
{
size_t slen;
void *membuf;
- struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st;
+ struct stat *st;
+ st = &cur->inode->st;
memset(dinp, 0, sizeof(*dinp));
dinp->di_mode = cur->inode->st.st_mode;
dinp->di_nlink = cur->inode->nlink;
@@ -725,8 +726,9 @@ ffs_build_dinode2(struct ufs2_dinode *dinp, dirbuf_t *dbufp, fsnode *cur,
{
size_t slen;
void *membuf;
- struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st;
+ struct stat *st;
+ st = &cur->inode->st;
memset(dinp, 0, sizeof(*dinp));
dinp->di_mode = cur->inode->st.st_mode;
dinp->di_nlink = cur->inode->nlink;
diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c
index 441af0cae86a..b104f419a86a 100644
--- a/usr.sbin/makefs/msdos/msdosfs_vnops.c
+++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c
@@ -94,8 +94,6 @@ static void unix2fattime(const struct timespec *tsp, uint16_t *ddp,
static void
msdosfs_times(struct denode *dep, const struct stat *st)
{
- if (stampst.st_ino)
- st = &stampst;
#if HAVE_STRUCT_STAT_BIRTHTIME
unix2fattime(&st->st_birthtim, &dep->de_CDate, &dep->de_CTime);