https://bugzilla.novell.com/show_bug.cgi?id=856915 https://bugzilla.novell.com/show_bug.cgi?id=856915#c1 Michal Vyskocil <mvyskocil@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO CC| |tchvatal@suse.com InfoProvider| |tcech@suse.com --- Comment #1 from Michal Vyskocil <mvyskocil@suse.com> 2014-01-03 09:47:58 UTC --- (In reply to comment #0)
Lines 81-85 looks suspicious, these changes are from one chunk of libgcrypt-1.5.0-etc_gcrypt_rngseed-symlink.diff:
- if (fd == -1) - log_fatal ("can't open %s: %s\n", name, strerror(errno) ); + { + if (fatal) + log_fatal ("can't open %s: %s\n", name, strerror(errno) ); + return fd; + }
Is this really correct? It causes that lines 87+ are never run.
No, this code belongs to if (fd == -1) branch, so my bad. I've commited fixes version of it to d:l:c_c++/libgcrypt. The relevant part now look like - if (fd == -1 && retry) - { + if (fd == -1) { + if (retry) + { struct timeval tv; tv.tv_sec = 5; @@ -76,9 +78,14 @@ open_device (const char *name, int retry _gcry_random_progress ("wait_dev_random", 'X', 0, (int)tv.tv_sec); select (0, NULL, NULL, NULL, &tv); goto again; - } - if (fd == -1) - log_fatal ("can't open %s: %s\n", name, strerror(errno) ); + } + else + { + if (fatal) + log_fatal ("can't open %s: %s\n", name, strerror(errno) ); + return fd; + } + } So the return fd is called only if fd == -1 (and retry is not specified). This matches the original behavior. Please test. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.