魔术价值有什么意义?

时间:2014-01-31 18:08:35

标签: linux kernel driver device

tty_driver struct中的'magic'值是什么

struct tty_driver {
   int     magic;          /* magic number for this structure */
   struct kref kref;       /* Reference management */
   struct cdev cdev;
   struct module   *owner;
   const char      *driver_name;
   ....
   ....

1 个答案:

答案 0 :(得分:0)

/* tty driver magic number */
#define TTY_DRIVER_MAGIC        0x5402

来自tty_driver.h列出here