44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
#ifndef _PROC_API_H
|
|
#define _PROC_API_H
|
|
#ifdef __KERNEL__
|
|
|
|
#include <asm/atomic.h>
|
|
|
|
#include "../../common/common.h"
|
|
|
|
#define PROC_API_DIR_NAME ("isg")
|
|
|
|
typedef enum {
|
|
ERR_DBGFS_NO_ERROR = 0,
|
|
ERR_PARA_OUTOFRANGE,
|
|
ERR_MALLOC_MEMORY,
|
|
ERR_DBGFS_INIT,
|
|
ERR_DBGFS_REGISTER,
|
|
ERR_DBGFS_UNREGISTER,
|
|
ERR_DBGFS_WRITEOPTS
|
|
} PROC_ERRCODE;
|
|
|
|
typedef struct {
|
|
const char* name;
|
|
unsigned int params;
|
|
unsigned long mask;
|
|
char* cmd;
|
|
char* cmd_data;
|
|
int (* show)(struct seq_file*, void*);
|
|
int (* ioctl)(struct seq_file*, void*);
|
|
int (* help)(struct seq_file*, void*);
|
|
} DBGFS_PRIV, *PDBGFS_PRIV;
|
|
|
|
typedef struct {
|
|
const char* dir_name;
|
|
PDBGFS_PRIV data;
|
|
int num_data;
|
|
} PROC_API, *PPROC_API;
|
|
|
|
int proc_api_register(PPROC_API pv);
|
|
int proc_api_unregister(PPROC_API pv);
|
|
int get_int_value(unsigned char* pBuf, int index);
|
|
int get_string_value(unsigned char* pBuf, int index, unsigned char* pValue, unsigned int maxBytes);
|
|
#endif
|
|
#endif
|