author | yz157939@agc105 |
Fri, 25 Apr 2008 17:02:23 +0800 | |
changeset 147 | 8c4ef02c14b8 |
permissions | -rw-r--r-- |
147
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
1 |
/* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
2 |
* CDDL HEADER START |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
3 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
4 |
* The contents of this file are subject to the terms of the |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
5 |
* Common Development and Distribution License (the "License"). |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
6 |
* You may not use this file except in compliance with the License. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
7 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
8 |
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
9 |
* or http://www.opensolaris.org/os/licensing. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
10 |
* See the License for the specific language governing permissions |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
11 |
* and limitations under the License. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
12 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
13 |
* When distributing Covered Code, include this CDDL HEADER in each |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
14 |
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
15 |
* If applicable, add the following below this CDDL HEADER, with the |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
16 |
* fields enclosed by brackets "[]" replaced with your own identifying |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
17 |
* information: Portions Copyright [yyyy] [name of copyright owner] |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
18 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
19 |
* CDDL HEADER END |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
20 |
*/ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
21 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
22 |
/* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
23 |
* Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
24 |
* Use is subject to license terms. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
25 |
*/ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
26 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
27 |
#include <stdlib.h> |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
28 |
#include <stdio.h> |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
29 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
30 |
int |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
31 |
fsexam_debug (void) |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
32 |
{ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
33 |
static int initialized = 0; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
34 |
static int debug = 0; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
35 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
36 |
if (0 == initialized){ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
37 |
char *ev = NULL; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
38 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
39 |
initialized = 1; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
40 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
41 |
ev = getenv ("FSEXAM_DEBUG"); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
42 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
43 |
if (ev != NULL){ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
44 |
debug = atoi (ev); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
45 |
if (debug <= 0) |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
46 |
debug = 0; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
47 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
48 |
(void) printf ("FSEXAM_DEBUG=%s, debug = %d\n", ev, debug); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
49 |
} |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
50 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
51 |
} |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
52 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
53 |
return debug; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
54 |
} |