Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs - Clear fs_fmod in superblock before final w...
details: https://anonhg.NetBSD.org/src/rev/0570c49dc8a0
branches: trunk
changeset: 522279:0570c49dc8a0
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Feb 15 04:04:57 2002 +0000
description:
- Clear fs_fmod in superblock before final write. Noted by Erik Anggard.
- Explicitly close the image file descriptor at the end of ffs_makefs().
diffstat:
usr.sbin/makefs/ffs.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 0d6226ff3bbb -r 0570c49dc8a0 usr.sbin/makefs/ffs.c
--- a/usr.sbin/makefs/ffs.c Fri Feb 15 00:40:23 2002 +0000
+++ b/usr.sbin/makefs/ffs.c Fri Feb 15 04:04:57 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.c,v 1.13 2002/02/06 02:17:14 lukem Exp $ */
+/* $NetBSD: ffs.c,v 1.14 2002/02/15 04:04:57 lukem 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.13 2002/02/06 02:17:14 lukem Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.14 2002/02/15 04:04:57 lukem Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -252,7 +252,12 @@
bcleanup();
/* write out superblock; image is now complete */
+
+ ((struct fs *)fsopts->superblock)->fs_fmod = 0;
ffs_write_superblock(fsopts->superblock, fsopts);
+ if (close(fsopts->fd) == -1)
+ err(1, "Closing `%s'", image);
+ fsopts->fd = -1;
printf("Image `%s' complete\n", image);
}
Home |
Main Index |
Thread Index |
Old Index