misc.h (37106d55) | misc.h (342440ec) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the |
5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. | 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. |
8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* | 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* |
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. | 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. 25 */ 26 27#ifndef _MISC_H 28#define _MISC_H 29 | 23 * Use is subject to license terms. 24 */ 25 26#ifndef _MISC_H 27#define _MISC_H 28 |
30#pragma ident "%Z%%M% %I% %E% SMI" 31 | |
32#ifdef __cplusplus 33extern "C" { 34#endif 35 36/* 37 * This file contains declarations pertaining to the miscellaneous routines. 38 */ 39#include <setjmp.h> --- 124 unchanged lines hidden (view full) --- 164 165int whole_disk_name(char *name); 166int canonical_name(char *name); 167int canonical4x_name(char *name); 168void canonicalize_name(char *dst, char *src); 169int match_substr(char *s1, char *s2); 170void dump(char *, caddr_t, int, int); 171float bn2mb(uint64_t); | 29#ifdef __cplusplus 30extern "C" { 31#endif 32 33/* 34 * This file contains declarations pertaining to the miscellaneous routines. 35 */ 36#include <setjmp.h> --- 124 unchanged lines hidden (view full) --- 161 162int whole_disk_name(char *name); 163int canonical_name(char *name); 164int canonical4x_name(char *name); 165void canonicalize_name(char *dst, char *src); 166int match_substr(char *s1, char *s2); 167void dump(char *, caddr_t, int, int); 168float bn2mb(uint64_t); |
172uint_t mb2bn(float); | 169diskaddr_t mb2bn(float); |
173float bn2gb(uint64_t); 174float bn2tb(uint64_t); | 170float bn2gb(uint64_t); 171float bn2tb(uint64_t); |
175uint_t gb2bn(float); | 172diskaddr_t gb2bn(float); |
176int get_tty_lines(); 177 178 179/* 180 * Macro to handle internal programming errors that 181 * should "never happen". 182 */ 183#define impossible(msg) {err_print("Internal error: file %s, line %d: %s\n", \ --- 17 unchanged lines hidden --- | 173int get_tty_lines(); 174 175 176/* 177 * Macro to handle internal programming errors that 178 * should "never happen". 179 */ 180#define impossible(msg) {err_print("Internal error: file %s, line %d: %s\n", \ --- 17 unchanged lines hidden --- |