Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 2 of 2) sorted by relevance

/nrf_hw_models-3.7.0/src/HW_models/
DNHW_NVM_backend.c34 st->fd = -1; in nhw_nvm_initialize_data_storage()
43 st->fd = open(st->file_path, O_RDWR | O_CREAT, (mode_t)0600); in nhw_nvm_initialize_data_storage()
44 if (st->fd == -1) { in nhw_nvm_initialize_data_storage()
49 rc = fstat(st->fd, &f_stat); in nhw_nvm_initialize_data_storage()
55 if (ftruncate(st->fd, st->size) == -1) { in nhw_nvm_initialize_data_storage()
60 st->storage = mmap(NULL, st->size, PROT_WRITE | PROT_READ, MAP_SHARED, st->fd, 0); in nhw_nvm_initialize_data_storage()
106 if (st->fd != -1) { in nhw_nvm_clear_storage()
107 close(st->fd); in nhw_nvm_clear_storage()
108 st->fd = -1; in nhw_nvm_clear_storage()
DNHW_NVM_backend.h22 int fd; member