spbx/roms/srcs/images/ethernet/gianfar_eth/debug_info.h

43 lines
1.1 KiB
C

#ifdef __KERNEL__
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <asm/uaccess.h>
#include "../../../../../drivers/srcs/common/HD_STD_Define.h"
#define MAX_NAME_LEN (32)
#define MAX_CMD_LEN (128)
typedef enum __PROC_ERRCODE__
{
ERR_DBGFS_NO_ERROR = 0,
ERR_PARA_OUTOFRANGE,
ERR_DBGFS_INIT,
ERR_DBGFS_REGISTER,
ERR_DBGFS_UNREGISTER,
ERR_DBGFS_WRITEOPTS,
} PROC_ERRCODE;
typedef struct __DBGFS_PRIV__
{
const char name[MAX_NAME_LEN];
unsigned int params;
void* file;
void* data;
int (* show)(struct seq_file* , void*);
int (* ioctl)(struct seq_file* , char*, char*);
int (* help)(struct seq_file* , void*);
} DBGFS_PRIV, *PDBGFS_PRIV;
int InitDebugInfoProc(const char*);
void DeInitDebugInfoProc(void);
int DebugFsRegister(PDBGFS_PRIV pv);
int DebugFsUnRegister(PDBGFS_PRIV pv);
int GetIntParamValue(unsigned char* pBuf, int index);
int GetStringParamValue(unsigned char* pBuf, int index, unsigned char* pValue, unsigned int maxBytes);
#endif