clean up definitions of ctod(), dtoc(), ctob(), btoc(), btodb(), and
dbtob(). remove unused definitions of ctos(), stoc(), and dtob().
This commit is contained in:
parent
c8858650b0
commit
2d49c3885b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.4 1995/03/28 18:13:48 jtc Exp $ */
|
||||
/* $NetBSD: param.h,v 1.5 1995/06/26 06:55:38 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -114,21 +114,17 @@
|
||||
#define NKMEMCLUSTERS (1024*1024/CLBYTES) /* XXX? */
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (8192 bytes) to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((unsigned long)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.21 1995/05/16 20:59:15 chopps Exp $ */
|
||||
/* $NetBSD: param.h,v 1.22 1995/06/26 06:55:48 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -115,20 +115,16 @@
|
||||
#define MAXPARTITIONS 16
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.6 1995/04/30 14:02:12 leo Exp $ */
|
||||
/* $NetBSD: param.h,v 1.7 1995/06/26 06:55:51 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -116,20 +116,16 @@
|
||||
#define MAXPARTITIONS 16
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.20 1995/03/28 18:16:35 jtc Exp $ */
|
||||
/* $NetBSD: param.h,v 1.21 1995/06/26 06:55:54 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -110,13 +110,13 @@
|
||||
#define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((unsigned)(x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((unsigned)(x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((unsigned)(x) << PGSHIFT)
|
||||
#define btoc(x) (((unsigned)(x) + PGOFSET) >> PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.25 1995/03/28 18:16:58 jtc Exp $ */
|
||||
/* $NetBSD: param.h,v 1.26 1995/06/26 06:55:58 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -113,13 +113,13 @@
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((unsigned)(x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((unsigned)(x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* bytes to pages */
|
||||
#define ctob(x) ((unsigned)(x) << PGSHIFT)
|
||||
#define btoc(x) (((unsigned)(x) + PGOFSET) >> PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.18 1995/06/21 03:08:29 briggs Exp $ */
|
||||
/* $NetBSD: param.h,v 1.19 1995/06/26 06:56:01 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -151,13 +151,13 @@
|
||||
#define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((unsigned)(x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((unsigned)(x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((unsigned)(x) << PGSHIFT)
|
||||
#define btoc(x) (((unsigned)(x) + PGOFSET) >> PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.11 1995/03/28 18:18:22 jtc Exp $ */
|
||||
/* $NetBSD: param.h,v 1.12 1995/06/26 06:56:05 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -123,25 +123,17 @@
|
||||
* Some macros for units conversion
|
||||
*/
|
||||
|
||||
/* Core clicks (4096 bytes) to segments and vice versa */
|
||||
#define ctos(x) (x)
|
||||
#define stoc(x) (x)
|
||||
|
||||
/* Core clicks (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* clicks to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to clicks */
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.9 1995/03/28 18:19:19 jtc Exp $ */
|
||||
/* $NetBSD: param.h,v 1.10 1995/06/26 06:56:08 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -115,20 +115,16 @@
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.13 1995/03/28 18:19:53 jtc Exp $ */
|
||||
/* $NetBSD: param.h,v 1.14 1995/06/26 06:56:14 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -137,21 +137,17 @@ extern int nbpg, pgofset, pgshift;
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtob(x) ((x) << DEV_BSHIFT)
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((unsigned)(x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.27 1995/06/13 22:14:24 gwr Exp $ */
|
||||
/* $NetBSD: param.h,v 1.28 1995/06/26 06:56:19 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Gordon W. Ross
|
||||
@ -112,21 +112,17 @@
|
||||
#define NKMEMCLUSTERS (2048*1024/CLBYTES)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param3.h,v 1.27 1995/06/13 22:14:24 gwr Exp $ */
|
||||
/* $NetBSD: param3.h,v 1.28 1995/06/26 06:56:19 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Gordon W. Ross
|
||||
@ -112,21 +112,17 @@
|
||||
#define NKMEMCLUSTERS (2048*1024/CLBYTES)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.9 1995/06/16 15:17:33 ragge Exp $ */
|
||||
/* $NetBSD: param.h,v 1.10 1995/06/26 06:56:23 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -125,29 +125,17 @@
|
||||
* Some macros for units conversion
|
||||
*/
|
||||
|
||||
/* Core clicks (512 bytes) to segments and vice versa */
|
||||
|
||||
#define ctos(x) (x)
|
||||
#define stoc(x) (x)
|
||||
|
||||
/* Core clicks (512 bytes) to disk blocks */
|
||||
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtob(x) ((x)<<DEV_BSHIFT)
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* clicks to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
|
||||
/* bytes to clicks */
|
||||
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
|
Loading…
Reference in New Issue
Block a user