Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
*/
+#include <errno.h>
#include <stdbool.h>
#include <c99_alloca.h>
#include "main/glheader.h"
file = os_file_create_unique(filename, 0644);
if (file)
break;
+ /* If we are failing for another reason than "this filename already
+ * exists", we are likely to fail again with another filename, so
+ * let's just give up */
+ if (errno != EEXIST)
+ break;
ralloc_free(filename);
}
if (file) {