Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs clarify comments, especially since ffs_isfreeblo...
details: https://anonhg.NetBSD.org/src/rev/d88529531844
branches: trunk
changeset: 555858:d88529531844
user: dbj <dbj%NetBSD.org@localhost>
date: Tue Dec 02 04:40:43 2003 +0000
description:
clarify comments, especially since ffs_isfreeblock is non-intuitive:
ffs_isblock:
check if a block is available
returns true if all the correponding bits in the free map are 1
returns false if any corresponding bit in the free map is 0
ffs_isfreeblock:
check if a block is completely allocated
returns true if all the corresponding bits in the free map are 0
returns false if any corresponding bit in the free map is 1
diffstat:
sys/ufs/ffs/ffs_subr.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r ed6daa24b42c -r d88529531844 sys/ufs/ffs/ffs_subr.c
--- a/sys/ufs/ffs/ffs_subr.c Tue Dec 02 04:18:19 2003 +0000
+++ b/sys/ufs/ffs/ffs_subr.c Tue Dec 02 04:40:43 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_subr.c,v 1.30 2003/10/27 00:12:42 lukem Exp $ */
+/* $NetBSD: ffs_subr.c,v 1.31 2003/12/02 04:40:43 dbj Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -36,7 +36,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.30 2003/10/27 00:12:42 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.31 2003/12/02 04:40:43 dbj Exp $");
#include <sys/param.h>
@@ -232,6 +232,8 @@
* block operations
*
* check if a block is available
+ * returns true if all the correponding bits in the free map are 1
+ * returns false if any corresponding bit in the free map is 0
*/
int
ffs_isblock(fs, cp, h)
@@ -260,7 +262,9 @@
}
/*
- * check if a block is free
+ * check if a block is completely allocated
+ * returns true if all the corresponding bits in the free map are 0
+ * returns false if any corresponding bit in the free map is 1
*/
int
ffs_isfreeblock(fs, cp, h)
Home |
Main Index |
Thread Index |
Old Index