#include <stdio.h>
#include <errno.h>
#include "Include/sfaterror.h"
#include "Include/fat_defs.h"
Vai al codice sorgente di questo file.
Funzioni | |
void | sfaterror (int err) |
This program is free software; you can redistribuite it and/or modify it under the terms of the GNU/General Pubblic License as published the Free software Foundation; either version 2 of the License, or (at your opinion) any later version.
Definizione nel file sfaterror.c.
void sfaterror | ( | int | err | ) |
Stampa su stderr un messaggio di errore
err | codice di errore da stampare: se err==STDLIBERR, errno e' stato settato invoca perror, altrimenti stampa messaggi di errore per gli errori definiti in fat_defs.h |
Definizione alla linea 19 del file sfaterror.c.
00019 { 00020 int err_no; 00021 00022 err_no = errno; 00023 switch(err){ 00024 case STDLIBERR: 00025 perror(NULL); 00026 fprintf(stderr,"Error No: %d\n",err_no); 00027 errno = err_no; 00028 break; 00029 case ENTL: 00030 fprintf(stderr,"Error Name Too Long (exceeding MAX_LEN_NAME)\n"); 00031 break; 00032 case ERFCD: 00033 fprintf(stderr,"Error Reading Fat Control Data \n"); 00034 break; 00035 case ERBD: 00036 fprintf(stderr,"Error Reading Block Data \n"); 00037 break; 00038 case ENSFD: 00039 fprintf(stderr,"Error No Such File or Directory \n"); 00040 break; 00041 case EDAEX: 00042 fprintf(stderr,"Error File/Directory Already Exists \n"); 00043 break; 00044 case ENMSD: 00045 fprintf(stderr,"Error No More Space on Device \n"); 00046 break; 00047 case EWFCD: 00048 fprintf(stderr,"Error Writing Fat Control Data \n"); 00049 break; 00050 case EWBD: 00051 fprintf(stderr,"Error Writing Block Data \n"); 00052 break; 00053 case EBDP: 00054 /* fprintf(stderr,"Error Bad Directory Path \n"); */ 00055 break; 00056 } 00057 }