mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
test-runner: fix logging directory name
localtime indexes month starting at zero so adding 1 gives us a folder name with the correct month. The year is also set as 'years since 1900', so we need to add 1900 to the year to get the actual year.
This commit is contained in:
parent
2a2f60d86b
commit
506f502900
@ -3183,8 +3183,8 @@ int main(int argc, char *argv[])
|
||||
log_uid = atoi(getenv("SUDO_UID"));
|
||||
|
||||
snprintf(log_dir, sizeof(log_dir), "%s/run-%d-%d-%d-%d",
|
||||
optarg, timeinfo->tm_year,
|
||||
timeinfo->tm_mon, timeinfo->tm_mday,
|
||||
optarg, timeinfo->tm_year + 1900,
|
||||
timeinfo->tm_mon + 1, timeinfo->tm_mday,
|
||||
getpid());
|
||||
mkdir(log_dir, 0755);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user