| 168 | | /* End of file - check if file size changed... */ |
|---|
| 169 | | struct stat st; |
|---|
| 170 | | |
|---|
| 171 | | if ((fstat (p_sys->fd, &st) == 0) |
|---|
| 172 | | && (st.st_size != p_access->info.i_size)) |
|---|
| 173 | | { |
|---|
| 174 | | p_access->info.i_size = st.st_size; |
|---|
| 175 | | p_access->info.i_update |= INPUT_UPDATE_SIZE; |
|---|
| 176 | | } |
|---|
| 177 | | |
|---|
| 178 | | /* Really at end of file then */ |
|---|
| 179 | | if ((uint64_t)p_access->info.i_pos >= (uint64_t)p_access->info.i_size) |
|---|
| 180 | | { |
|---|
| 181 | | p_access->info.b_eof = true; |
|---|
| 182 | | msg_Dbg (p_access, "at end of memory mapped file"); |
|---|
| 183 | | return NULL; |
|---|
| 184 | | } |
|---|
| | 178 | /* We are at end of file */ |
|---|
| | 179 | p_access->info.b_eof = true; |
|---|
| | 180 | msg_Dbg (p_access, "at end of memory mapped file"); |
|---|
| | 181 | return NULL; |
|---|