xref: /aosp_15_r20/external/e2fsprogs/lib/e2p/pe.c (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker /*
2*6a54128fSAndroid Build Coastguard Worker  * pe.c			- Print a second extended filesystem errors behavior
3*6a54128fSAndroid Build Coastguard Worker  *
4*6a54128fSAndroid Build Coastguard Worker  * Copyright (C) 1992, 1993, 1994  Remy Card <[email protected]>
5*6a54128fSAndroid Build Coastguard Worker  *                                 Laboratoire MASI, Institut Blaise Pascal
6*6a54128fSAndroid Build Coastguard Worker  *                                 Universite Pierre et Marie Curie (Paris VI)
7*6a54128fSAndroid Build Coastguard Worker  *
8*6a54128fSAndroid Build Coastguard Worker  * %Begin-Header%
9*6a54128fSAndroid Build Coastguard Worker  * This file may be redistributed under the terms of the GNU Library
10*6a54128fSAndroid Build Coastguard Worker  * General Public License, version 2.
11*6a54128fSAndroid Build Coastguard Worker  * %End-Header%
12*6a54128fSAndroid Build Coastguard Worker  */
13*6a54128fSAndroid Build Coastguard Worker 
14*6a54128fSAndroid Build Coastguard Worker /*
15*6a54128fSAndroid Build Coastguard Worker  * History:
16*6a54128fSAndroid Build Coastguard Worker  * 94/01/09	- Creation
17*6a54128fSAndroid Build Coastguard Worker  */
18*6a54128fSAndroid Build Coastguard Worker 
19*6a54128fSAndroid Build Coastguard Worker #include "config.h"
20*6a54128fSAndroid Build Coastguard Worker #include <stdio.h>
21*6a54128fSAndroid Build Coastguard Worker 
22*6a54128fSAndroid Build Coastguard Worker #include "e2p.h"
23*6a54128fSAndroid Build Coastguard Worker 
print_fs_errors(FILE * f,unsigned short errors)24*6a54128fSAndroid Build Coastguard Worker void print_fs_errors (FILE * f, unsigned short errors)
25*6a54128fSAndroid Build Coastguard Worker {
26*6a54128fSAndroid Build Coastguard Worker 	switch (errors)
27*6a54128fSAndroid Build Coastguard Worker 	{
28*6a54128fSAndroid Build Coastguard Worker 		case EXT2_ERRORS_CONTINUE:
29*6a54128fSAndroid Build Coastguard Worker 			fprintf (f, "Continue");
30*6a54128fSAndroid Build Coastguard Worker 			break;
31*6a54128fSAndroid Build Coastguard Worker 		case EXT2_ERRORS_RO:
32*6a54128fSAndroid Build Coastguard Worker 			fprintf (f, "Remount read-only");
33*6a54128fSAndroid Build Coastguard Worker 			break;
34*6a54128fSAndroid Build Coastguard Worker 		case EXT2_ERRORS_PANIC:
35*6a54128fSAndroid Build Coastguard Worker 			fprintf (f, "Panic");
36*6a54128fSAndroid Build Coastguard Worker 			break;
37*6a54128fSAndroid Build Coastguard Worker 		default:
38*6a54128fSAndroid Build Coastguard Worker 			fprintf (f, "Unknown (continue)");
39*6a54128fSAndroid Build Coastguard Worker 	}
40*6a54128fSAndroid Build Coastguard Worker }
41