Lines Matching refs:cgp
1906 cg_sanity(struct cg *cgp, int cgno) in cg_sanity() argument
1921 if (!cg_chkmagic(cgp)) { in cg_sanity()
1924 cgp->cg_magic, CG_MAGIC); in cg_sanity()
1928 if (cgp->cg_cgx != cgno) { in cg_sanity()
1931 cgp->cg_cgx, cgno); in cg_sanity()
1935 if ((cgp->cg_btotoff & 3) != 0) { in cg_sanity()
1938 cgp->cg_btotoff); in cg_sanity()
1942 if ((cgp->cg_boff & 1) != 0) { in cg_sanity()
1945 cgp->cg_boff); in cg_sanity()
1949 if ((cgp->cg_ncyl < 1) || (cgp->cg_ncyl > sblock.fs_cpg)) { in cg_sanity()
1950 if (cgp->cg_ncyl < 1) { in cg_sanity()
1953 cgp->cg_ncyl); in cg_sanity()
1957 cgp->cg_ncyl, sblock.fs_cpg); in cg_sanity()
1962 if (cgp->cg_niblk != sblock.fs_ipg) { in cg_sanity()
1965 cgp->cg_niblk, sblock.fs_ipg); in cg_sanity()
1969 if (cgp->cg_ndblk != ndblk) { in cg_sanity()
1972 cgp->cg_ndblk, ndblk); in cg_sanity()
1976 if ((cgp->cg_rotor < 0) || (cgp->cg_rotor >= ndblk)) { in cg_sanity()
1980 cgp->cg_rotor, ndblk); in cg_sanity()
1984 if ((cgp->cg_frotor < 0) || (cgp->cg_frotor >= ndblk)) { in cg_sanity()
1988 cgp->cg_frotor, ndblk); in cg_sanity()
1992 if ((cgp->cg_irotor < 0) || (cgp->cg_irotor >= sblock.fs_ipg)) { in cg_sanity()
1996 cgp->cg_irotor, sblock.fs_ipg); in cg_sanity()
2000 if (cgp->cg_btotoff != exp_btotoff) { in cg_sanity()
2003 cgp->cg_btotoff, exp_btotoff); in cg_sanity()
2007 if (cgp->cg_boff != exp_boff) { in cg_sanity()
2010 cgp->cg_boff, exp_boff); in cg_sanity()
2014 if (cgp->cg_iusedoff != exp_iusedoff) { in cg_sanity()
2017 cgp->cg_iusedoff, exp_iusedoff); in cg_sanity()
2021 if (cgp->cg_freeoff != exp_freeoff) { in cg_sanity()
2024 cgp->cg_freeoff, exp_freeoff); in cg_sanity()
2028 if (cgp->cg_nextfreeoff != exp_nextfreeoff) { in cg_sanity()
2031 cgp->cg_nextfreeoff, exp_nextfreeoff); in cg_sanity()
2052 struct cg *cgp; in cg_constants() local
2056 cgp = cgblk.b_un.b_cg; in cg_constants()
2064 *btotoff = &cgp->cg_space[0] - (uchar_t *)(&cgp->cg_link); in cg_constants()
2078 fix_cg(struct cg *cgp, int cgno) in fix_cg() argument
2087 if (cgp->cg_cgx != cgno) { in fix_cg()
2088 cgp->cg_cgx = cgno; in fix_cg()
2091 if ((cgp->cg_ncyl < 1) || (cgp->cg_ncyl > sblock.fs_cpg)) { in fix_cg()
2093 cgp->cg_ncyl = sblock.fs_ncyl - in fix_cg()
2096 cgp->cg_ncyl = sblock.fs_cpg; in fix_cg()
2100 if (cgp->cg_niblk != sblock.fs_ipg) { in fix_cg()
2105 cgp->cg_niblk = sblock.fs_ipg; in fix_cg()
2108 if (cgp->cg_ndblk != ndblk) { in fix_cg()
2109 cgp->cg_ndblk = ndblk; in fix_cg()
2116 if ((cgp->cg_rotor < 0) || (cgp->cg_rotor >= cgp->cg_ndblk)) { in fix_cg()
2117 cgp->cg_rotor = 0; in fix_cg()
2120 if ((cgp->cg_frotor < 0) || (cgp->cg_frotor >= cgp->cg_ndblk)) { in fix_cg()
2121 cgp->cg_frotor = 0; in fix_cg()
2124 if ((cgp->cg_irotor < 0) || (cgp->cg_irotor >= sblock.fs_ipg)) { in fix_cg()
2125 cgp->cg_irotor = 0; in fix_cg()
2135 if (cgp->cg_btotoff != exp_btotoff) { in fix_cg()
2136 cgp->cg_btotoff = exp_btotoff; in fix_cg()
2139 if (cgp->cg_boff != exp_boff) { in fix_cg()
2140 cgp->cg_boff = exp_boff; in fix_cg()
2143 if (cgp->cg_iusedoff != exp_iusedoff) { in fix_cg()
2144 cgp->cg_iusedoff = exp_iusedoff; in fix_cg()
2147 if (cgp->cg_freeoff != exp_freeoff) { in fix_cg()
2148 cgp->cg_freeoff = exp_freeoff; in fix_cg()
2151 if (cgp->cg_nextfreeoff != exp_nextfreeoff) { in fix_cg()
2152 cgp->cg_nextfreeoff = exp_nextfreeoff; in fix_cg()
2159 cgp->cg_magic = CG_MAGIC; in fix_cg()
2160 cgp->cg_time = time(NULL); in fix_cg()