Module Name: src
Committed By: christos
Date: Wed Feb 8 21:27:26 UTC 2017
Modified Files:
src/usr.sbin/makefs: ffs.c
Log Message:
stampst.st_ion consistent treatment (non-zero vs zero instead of testing == 1)
To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.sbin/makefs/ffs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makefs/ffs.c
diff -u src/usr.sbin/makefs/ffs.c:1.68 src/usr.sbin/makefs/ffs.c:1.69
--- src/usr.sbin/makefs/ffs.c:1.68 Tue Feb 7 21:23:45 2017
+++ src/usr.sbin/makefs/ffs.c Wed Feb 8 16:27:26 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.c,v 1.68 2017/02/08 02:23:45 christos Exp $ */
+/* $NetBSD: ffs.c,v 1.69 2017/02/08 21:27:26 christos Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -71,7 +71,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.68 2017/02/08 02:23:45 christos Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.69 2017/02/08 21:27:26 christos Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -532,7 +532,7 @@ ffs_create_image(const char *image, fsin
if (debug & DEBUG_FS_CREATE_IMAGE)
printf("calling mkfs(\"%s\", ...)\n", image);
- if (stampst.st_ino == 1)
+ if (stampst.st_ino)
tstamp = stampst.st_ctime;
else
tstamp = start_time.tv_sec;
@@ -646,7 +646,7 @@ ffs_build_dinode1(struct ufs1_dinode *di
{
size_t slen;
void *membuf;
- struct stat *st = stampst.st_ino == 1 ? &stampst : &cur->inode->st;
+ struct stat *st = stampst.st_ino ? &stampst : &cur->inode->st;
memset(dinp, 0, sizeof(*dinp));
dinp->di_mode = cur->inode->st.st_mode;
@@ -696,7 +696,7 @@ ffs_build_dinode2(struct ufs2_dinode *di
{
size_t slen;
void *membuf;
- struct stat *st = stampst.st_ino == 1 ? &stampst : &cur->inode->st;
+ struct stat *st = stampst.st_ino ? &stampst : &cur->inode->st;
memset(dinp, 0, sizeof(*dinp));
dinp->di_mode = cur->inode->st.st_mode;