Commit Graph

2 Commits

Author SHA1 Message Date
Tianhua Sun e749ced4a0 dm: remove unsafe apis in dm log
sprintf/vsnprintf are not safe, so use snprintf
instead of sprintf, use vasprintf instead of vsnprintf.

Tracked-On: #3394
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
2019-07-12 09:41:15 +08:00
Minggui Cao c04949d993 DM: add disk-logger to write log into file system
disk-logger used to save persistent log as file in disk.
log path: /var/log/acrn-dm/

each log file size is 2MB; default 8 log files; the log
files' suffix will be increased; when file count more than 8,
the last one added, the first one is removed, like form 1-8 to
2-9 to 3-10 ...

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2019-06-13 13:06:51 +08:00