⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pc_error.c

📁 文件系统Nucleus file的资源包
💻 C
字号:
/******************************************************************************
    pc_report_error() - Report internal error:  (MUST BE USER SUPPLIED !)
					   
Summary

 Description
 	When the system detects an error needs it calls this routine with 
    PCERR_????? as an argument. In the reference port we call printf
    to report the error. You may do anything you like with these 
    errors.

 Returns
 	Returns NOTHING.

*****************************************************************************/

#include "pcdisk.h"

LOCAL TEXT *pc_error_strings[] = {
    /* PCERR_FAT_FLUSH 0 */ "Cant flush FAT\n",
    /* PCERR_FAT_NULLP 1 */ "flushfat called with null pointer",
    /* PCERR_FMTCSIZE  2 */ "Cluster Size too small for HUGE partition., Can't Format",
    /* PCERR_FMTFSIZE  3 */ "File allocation Table Too Small, Can't Format",
    /* PCERR_FMTRSIZE  4 */ "Numroot must be an even multiple of INOPBLOCK",
    /* PCERR_FMTWBZERO 5 */ "Failed writing block 0",
    /* PCERR_FMTWFAT   6 */ "Failed writing FAT block",
    /* PCERR_FMTWROOT  7 */ "Failed writing root block",
    /* PCERR_FMT2BIG   8 */ "Total sectors may not exceed 64k.",
    /* PCERR_FSTOPEN  9 */  "pc_free_all freeing a file",
    /* PCERR_INITMEDI 10 */  "Not a DOS disk:pc_dskinit",
    /* PCERR_INITDRNO 11 */  "Invalid driveno to pc_dskinit",
    /* PCERR_INITCORE 12 */  "Out of core:pc_dskinit",
    /* PCERR_INITDEV  13 */  "Can't initialize device:pc_dskinit",
    /* PCERR_INITREAD 14 */  "Can't read block 0:pc_dskinit",
    /* PCERR_BLOCKCLAIM 15 */ "PANIC: Buffer Claim",
    /* PCERR_INITALLOC 16  */ "Fatal error: Not enough core at startup",
    /* PCERR_BLOCKLOCK  17 */ "Warning: freeing a locked buffer",
    /* PCERR_FREEINODE  18 */ "Bad free call to freei",
    /* PCERR_FREEDROBJ  19 */ "Bad free call to freeobj",
    /* PCERR_REMINODE   20 */ "Trying to remove inode with open > 1",
    /* PCERR_FATCORE    21 */ "Not Enough Core To Load FAT",
    /* PCERR_FATREAD    22 */ "IO Error While Failed Reading FAT",
    /* PCERR_BLOCKALLOC 23 */ "Block Alloc Failure Memory Not Initialized",
    /* PCERR_DROBJALLOC 24 */ "Memory Failure: Out of DROBJ Structures",
    /* PCERR_FINODEALLOC 25*/ "Memory Failure: Out of FINODE Structures",
    /* PCERR_USERS   26    */ "Out of User Structures",
    /* PCERR_BAD_USER  27   */ "Unregistered User"
    };

VOID pc_report_error(INT error_number)          /*__fn__*/
{
    printf("Error %d: %s\n", error_number, pc_error_strings[error_number]);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -