mirror of
https://github.com/corundum/corundum.git
synced 2025-01-16 08:12:53 +08:00
modules/mqnic: Store build date as a string
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
parent
cef4100af0
commit
2d975c1e83
@ -183,6 +183,8 @@ struct mqnic_dev {
|
||||
u32 if_stride;
|
||||
u32 if_csr_offset;
|
||||
|
||||
char build_date_str[32];
|
||||
|
||||
struct mqnic_if *interface[MQNIC_MAX_IF];
|
||||
|
||||
struct ptp_clock *ptp_clock;
|
||||
|
@ -288,12 +288,12 @@ static int mqnic_common_probe(struct mqnic_dev *mqnic)
|
||||
(mqnic->board_ver >> 8) & 0xff,
|
||||
mqnic->board_ver & 0xff);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
dev_info(dev, "Build date: %ptRd %ptRt UTC (raw: 0x%08x)", &tm, &tm, mqnic->build_date);
|
||||
snprintf(mqnic->build_date_str, sizeof(mqnic->build_date_str), "%ptRd %ptRt", &tm, &tm);
|
||||
#else
|
||||
dev_info(dev, "Build date: %04d-%02d-%02d %02d:%02d:%02d UTC (raw: 0x%08x)",
|
||||
tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
|
||||
tm.tm_hour, tm.tm_min, tm.tm_sec, mqnic->build_date);
|
||||
snprintf(mqnic->build_date_str, sizeof(mqnic->build_date_str), "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
#endif
|
||||
dev_info(dev, "Build date: %s UTC (raw: 0x%08x)", mqnic->build_date_str, mqnic->build_date);
|
||||
dev_info(dev, "Git hash: %08x", mqnic->git_hash);
|
||||
dev_info(dev, "Release info: %08x", mqnic->rel_info);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user