Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 1 | /* |
| 2 | * pe.c - Print a second extended filesystem errors behavior |
| 3 | * |
| 4 | * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr> |
| 5 | * Laboratoire MASI, Institut Blaise Pascal |
| 6 | * Universite Pierre et Marie Curie (Paris VI) |
| 7 | * |
| 8 | * This file can be redistributed under the terms of the GNU Library General |
| 9 | * Public License |
| 10 | */ |
| 11 | |
| 12 | /* |
| 13 | * History: |
| 14 | * 94/01/09 - Creation |
| 15 | */ |
| 16 | |
| 17 | #include <stdio.h> |
| 18 | |
| 19 | #include "e2p.h" |
| 20 | |
Mike Frysinger | 85cffcc | 2005-06-11 00:08:50 +0000 | [diff] [blame] | 21 | void print_fs_errors(FILE *f, unsigned short errors) |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 22 | { |
Mike Frysinger | 85cffcc | 2005-06-11 00:08:50 +0000 | [diff] [blame] | 23 | char *disp = NULL; |
| 24 | switch (errors) { |
| 25 | case EXT2_ERRORS_CONTINUE: disp = "Continue"; break; |
| 26 | case EXT2_ERRORS_RO: disp = "Remount read-only"; break; |
| 27 | case EXT2_ERRORS_PANIC: disp = "Panic"; break; |
| 28 | default: disp = "Unknown (continue)"; |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 29 | } |
Mike Frysinger | 85cffcc | 2005-06-11 00:08:50 +0000 | [diff] [blame] | 30 | fprintf(f, disp); |
Mike Frysinger | d89e629 | 2005-04-24 05:07:59 +0000 | [diff] [blame] | 31 | } |