Add os_file_exists()

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-03-28 10:38:17 +02:00 committed by Jouni Malinen
parent 1cb3eda954
commit d2bb2b4681
2 changed files with 17 additions and 0 deletions

View file

@ -407,6 +407,16 @@ char * os_readfile(const char *name, size_t *len)
}
int os_file_exists(const char *fname)
{
FILE *f = fopen(fname, "rb");
if (f == NULL)
return 0;
fclose(f);
return 1;
}
#ifndef WPA_TRACE
void * os_zalloc(size_t size)
{