提交 8592e04c 编写于 作者: O openharmony_ci 提交者: Gitee

!198 优化quickstart宏定义

Merge pull request !198 from boxi/master
......@@ -55,18 +55,16 @@ typedef enum {
QS_CTL_LIMIT
} QuickstartConctrl;
#define QS_STAGE_CNT (QS_STAGE_LIMIT - QS_STAGE1)
#define QS_STAGE_NO(x) QS_STAGE##x
#define QUICKSTART_IOC_MAGIC 'T'
#define QUICKSTART_UNREGISTER _IO(QUICKSTART_IOC_MAGIC, QS_UNREGISTER)
#define QUICKSTART_NOTIFY _IO(QUICKSTART_IOC_MAGIC, QS_NOTIFY)
#define QUICKSTART_LISTEN _IO(QUICKSTART_IOC_MAGIC, QS_LISTEN)
#define QUICKSTART_STAGE(x) _IO(QUICKSTART_IOC_MAGIC, QS_STAGE_NO(x))
#define QUICKSTART_STAGE(x) _IO(QUICKSTART_IOC_MAGIC, (x))
#define QUICKSTART_NODE "/dev/quickstart"
#define QS_STAGE_CNT (QS_STAGE_LIMIT - QS_STAGE1)
typedef void (*SysteminitHook)(void);
typedef struct {
......
......@@ -100,7 +100,7 @@ static ssize_t QuickstartIoctl(struct file *filep, int cmd, unsigned long arg)
QuickstartListen(arg);
break;
default:
QuickstartStageWorking(cmd - QUICKSTART_STAGE(1)); /* ioctl cmd converted to stage level */
QuickstartStageWorking(cmd - QUICKSTART_STAGE(QS_STAGE1)); /* ioctl cmd converted to stage level */
break;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册