2021-04-06 | Paul Boddie | raw annotate files changeset graph | Employ map request flags instead of the maximal flags when sending flexpages. Otherwise, mappings may be established with inappropriate permissions. |
1 #pragma once 2 3 #include "opener_resource.h" 4 5 /* Support for providing access to files. */ 6 7 class TestFileOpener : public OpenerResource 8 { 9 protected: 10 offset_t _file_size; 11 12 /* Configurable methods. */ 13 14 virtual fileid_t get_fileid(const char *path); 15 16 virtual Accessor *make_accessor(fileid_t fileid); 17 18 public: 19 explicit TestFileOpener(Pages *pages, offset_t file_size=0); 20 }; 21 22 // vim: tabstop=4 expandtab shiftwidth=4