Add os_file_exists()
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
1cb3eda954
commit
d2bb2b4681
2 changed files with 17 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue