pe.c 815 B

12345678910111213141516171819202122232425262728293031
  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. * History:
  13. * 94/01/09 - Creation
  14. */
  15. #include <stdio.h>
  16. #include "e2p.h"
  17. void print_fs_errors(FILE *f, unsigned short errors)
  18. {
  19. char *disp = NULL;
  20. switch (errors) {
  21. case EXT2_ERRORS_CONTINUE: disp = "Continue"; break;
  22. case EXT2_ERRORS_RO: disp = "Remount read-only"; break;
  23. case EXT2_ERRORS_PANIC: disp = "Panic"; break;
  24. default: disp = "Unknown (continue)";
  25. }
  26. fprintf(f, disp);
  27. }