印出debug message

  1. printf(xxx)可以直接印到封包裡
  2. 印到CONSOLE
    1. #define CONSOLE_PRINTF(args…) \
      { \
      int fd=open(‘/dev/console’, (1<<0));\
      fprintf(fd, args); \
      close(fd);\
      }
  3. 使用指令導到 /dev/console

    1. echo ‘XXXX’ > ‘/dev/console’

發表迴響

Copy Protected by Chetan's WP-Copyprotect.