diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-11-21 10:28:15 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-11-21 10:28:15 +0900 |
commit | 35abf4d2eb582b78873aa324f6d02976788ffbbc (patch) | |
tree | e9cfc61545d36af248a4c35622e21a17eef011b0 /random | |
parent | c34c9e70055ee43e5ef257384fa15941f064e5a4 (diff) | |
download | libgcrypt-35abf4d2eb582b78873aa324f6d02976788ffbbc.tar.gz |
random:w32: Don't emit message for diskperf when it's not useful.
* random/rndw32.c (slow_gatherer): Suppress emitting by log_info.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'random')
-rw-r--r-- | random/rndw32.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/random/rndw32.c b/random/rndw32.c index b3f63d20..ada7c5c0 100644 --- a/random/rndw32.c +++ b/random/rndw32.c @@ -624,8 +624,15 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), } else { - log_info ("NOTE: you should run 'diskperf -y' " - "to enable the disk statistics\n"); + DWORD err_code = GetLastError (); + + if (err_code == 0x32) + /* If it's ERROR_NOT_SUPPORTED, skip the message, as it + won't work. */ + ; + else + log_info ("NOTE: you should run 'diskperf -y' " + "to enable the disk statistics\n"); } CloseHandle (hDevice); } |