2012年1月5日 星期四

printk printf color for console debug

color

30(黑色)、31(红色)32(绿色) 33(黄色)34(蓝色)35(洋红)36(青色)、37(白色)

#ifdef STH_DEBUG
#define sth_dbg_printstring(key, value) printf("\033[1;31m%s = %s\033[0m\n", key, value)
#define sth_dbg_printint(key, value) printf("\033[1;31m%s = %d\033[0m\n", key, value)
#else
#define sth_dbg_printstring(key, value)
#define sth_dbg_printint(key, value)
#endif

How to repair and clone disk with ddrescue

  ddrescue  is a tool that can be used to repair and clone disks on a  Linux system . This includes hard drives, partitions, DVD discs, flas...