blob: 835274b54ab1c10f3464feca2a5974a7f31e5bce [file] [log] [blame]
"Robert P. J. Day"63fc1a92006-07-02 19:47:05 +00001/* vi: set sw=4 ts=4: */
Mike Frysingerd89e6292005-04-24 05:07:59 +00002/*
3 * pe.c - Print a second extended filesystem errors behavior
4 *
5 * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr>
6 * Laboratoire MASI, Institut Blaise Pascal
7 * Universite Pierre et Marie Curie (Paris VI)
8 *
9 * This file can be redistributed under the terms of the GNU Library General
10 * Public License
11 */
12
13/*
14 * History:
15 * 94/01/09 - Creation
16 */
17
18#include <stdio.h>
19
20#include "e2p.h"
21
Mike Frysinger85cffcc2005-06-11 00:08:50 +000022void print_fs_errors(FILE *f, unsigned short errors)
Mike Frysingerd89e6292005-04-24 05:07:59 +000023{
Mike Frysinger85cffcc2005-06-11 00:08:50 +000024 char *disp = NULL;
25 switch (errors) {
26 case EXT2_ERRORS_CONTINUE: disp = "Continue"; break;
27 case EXT2_ERRORS_RO: disp = "Remount read-only"; break;
28 case EXT2_ERRORS_PANIC: disp = "Panic"; break;
29 default: disp = "Unknown (continue)";
Mike Frysingerd89e6292005-04-24 05:07:59 +000030 }
Mike Frysinger85cffcc2005-06-11 00:08:50 +000031 fprintf(f, disp);
Mike Frysingerd89e6292005-04-24 05:07:59 +000032}