1.1 --- a/Makefile Sun Mar 14 00:40:21 2021 +0100
1.2 +++ b/Makefile Sun Mar 14 17:17:09 2021 +0100
1.3 @@ -51,7 +51,7 @@
1.4 opener_resource.cc opener_context_resource.cc \
1.5 page_mapper.cc page_queue.cc pager.cc pages.cc paging.cc \
1.6 region.cc resource_server.cc simple_pager.cc \
1.7 - host_file_accessor.cc host_file_opener.cc
1.8 + files/host_file_accessor.cc files/host_file_opener.cc
1.9
1.10 PLAIN_SRC_CC_dstest_test_server = \
1.11 access_map.cc accessing.cc accessor.cc \
1.12 @@ -60,7 +60,7 @@
1.13 opener_resource.cc opener_context_resource.cc \
1.14 page_mapper.cc page_queue.cc pager.cc pages.cc paging.cc \
1.15 region.cc resource_server.cc simple_pager.cc \
1.16 - test_file_accessor.cc test_file_opener.cc
1.17 + files/test_file_accessor.cc files/test_file_opener.cc
1.18
1.19 # Normal definitions.
1.20
1.21 @@ -86,7 +86,7 @@
1.22
1.23 REQUIRES_LIBS = l4re_c-util libipc libstdc++ libsystypes
1.24
1.25 -PRIVATE_INCDIR = $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR)
1.26 +PRIVATE_INCDIR = $(PKGDIR) $(PKGDIR)/files $(IDL_BUILD_DIR) $(IDL_EXPORT_DIR)
1.27
1.28 include $(L4DIR)/mk/prog.mk
1.29 include $(IDL_MK_DIR)/interface_rules.mk
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/files/host_file_accessor.cc Sun Mar 14 17:17:09 2021 +0100
2.3 @@ -0,0 +1,68 @@
2.4 +#include <stdio.h>
2.5 +#include <string.h>
2.6 +#include <sys/types.h>
2.7 +#include <sys/stat.h>
2.8 +
2.9 +#include "host_file_accessor.h"
2.10 +
2.11 +HostFileAccessor::HostFileAccessor(const char *path, fileid_t fileid)
2.12 +: Accessor(fileid), _path(path)
2.13 +{
2.14 + /* Initialise the size of the file. */
2.15 +
2.16 + struct stat buf;
2.17 +
2.18 + if (!stat(_path, &buf))
2.19 + _size = buf.st_size;
2.20 + else
2.21 + _size = 0;
2.22 +}
2.23 +
2.24 +/* Perform any closing operation on the file. */
2.25 +
2.26 +void HostFileAccessor::close()
2.27 +{
2.28 + fclose(_fp);
2.29 +}
2.30 +
2.31 +/* Perform any opening operation on the file. */
2.32 +
2.33 +void HostFileAccessor::open()
2.34 +{
2.35 + _fp = fopen(_path, "r");
2.36 +}
2.37 +
2.38 +/* Data transfer methods. */
2.39 +
2.40 +void HostFileAccessor::fill(Flexpage *flexpage)
2.41 +{
2.42 + /* Obtain the offset and seek in the file. */
2.43 +
2.44 + offset_t filepos = flexpage->base_offset;
2.45 +
2.46 + fseek(_fp, filepos, SEEK_SET);
2.47 +
2.48 + /* Tag the region with file state. */
2.49 +
2.50 + flexpage->region->fill(fileid, filepos);
2.51 +
2.52 + /* Fill the region with file content. */
2.53 +
2.54 + offset_t addr = flexpage->base_addr;
2.55 +
2.56 + size_t nread = fread((void *) addr, sizeof(char), flexpage->size, _fp);
2.57 +
2.58 + /* Pad the flexpage with zero. */
2.59 +
2.60 + memset((void *) (addr + nread), 0, flexpage->size - nread);
2.61 +}
2.62 +
2.63 +void HostFileAccessor::flush(Flexpage *flexpage)
2.64 +{
2.65 + /* NOTE: A real flush operation would store the memory content and update
2.66 + the file size, if appropriate. */
2.67 +
2.68 + flexpage->region->flush();
2.69 +}
2.70 +
2.71 +// vim: tabstop=4 expandtab shiftwidth=4
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/files/host_file_accessor.h Sun Mar 14 17:17:09 2021 +0100
3.3 @@ -0,0 +1,30 @@
3.4 +#pragma once
3.5 +
3.6 +#include <stdio.h>
3.7 +
3.8 +#include "accessor.h"
3.9 +
3.10 +/* A host filesystem file accessor, providing flexpages corresponding to file
3.11 + regions. */
3.12 +
3.13 +class HostFileAccessor : public Accessor
3.14 +{
3.15 +protected:
3.16 + const char *_path;
3.17 + FILE *_fp;
3.18 +
3.19 +public:
3.20 + explicit HostFileAccessor(const char *path, fileid_t fileid);
3.21 +
3.22 + virtual void close();
3.23 +
3.24 + virtual void open();
3.25 +
3.26 + /* Data transfer methods. */
3.27 +
3.28 + virtual void fill(Flexpage *flexpage);
3.29 +
3.30 + virtual void flush(Flexpage *flexpage);
3.31 +};
3.32 +
3.33 +// vim: tabstop=4 expandtab shiftwidth=4
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/files/host_file_opener.cc Sun Mar 14 17:17:09 2021 +0100
4.3 @@ -0,0 +1,34 @@
4.4 +#include <sys/stat.h>
4.5 +
4.6 +#include "host_file_accessor.h"
4.7 +#include "host_file_opener.h"
4.8 +
4.9 +/* Return a file identifier for the given 'path'. */
4.10 +
4.11 +fileid_t HostFileOpener::get_fileid(const char *path)
4.12 +{
4.13 + struct stat statbuf;
4.14 +
4.15 + /* Obtain the inode number.
4.16 + NOTE: This does not handle errors! */
4.17 +
4.18 + stat(path, &statbuf);
4.19 +
4.20 + _paths.insert(FilePathEntry(statbuf.st_ino, path));
4.21 +
4.22 + return statbuf.st_ino;
4.23 +}
4.24 +
4.25 +/* Return a new accessor for 'fileid'. */
4.26 +
4.27 +Accessor *HostFileOpener::make_accessor(fileid_t fileid)
4.28 +{
4.29 + FilePaths::iterator found = _paths.find(fileid);
4.30 +
4.31 + if (found != _paths.end())
4.32 + return new HostFileAccessor(found->second, fileid);
4.33 + else
4.34 + return NULL;
4.35 +}
4.36 +
4.37 +// vim: tabstop=4 expandtab shiftwidth=4
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/files/host_file_opener.h Sun Mar 14 17:17:09 2021 +0100
5.3 @@ -0,0 +1,36 @@
5.4 +#pragma once
5.5 +
5.6 +#include <map>
5.7 +
5.8 +#include "opener_resource.h"
5.9 +
5.10 +
5.11 +
5.12 +/* Collection types. */
5.13 +
5.14 +typedef std::map<fileid_t, const char *> FilePaths;
5.15 +typedef std::pair<fileid_t, const char *> FilePathEntry;
5.16 +
5.17 +
5.18 +
5.19 +/* Support for providing access to files. */
5.20 +
5.21 +class HostFileOpener : public OpenerResource
5.22 +{
5.23 +protected:
5.24 + FilePaths _paths;
5.25 +
5.26 + /* Configurable methods. */
5.27 +
5.28 + virtual fileid_t get_fileid(const char *path);
5.29 +
5.30 + virtual Accessor *make_accessor(fileid_t fileid);
5.31 +
5.32 +public:
5.33 + explicit HostFileOpener(Accessing *accessing, Paging *paging, Pages *pages)
5.34 + : OpenerResource(accessing, paging, pages)
5.35 + {
5.36 + }
5.37 +};
5.38 +
5.39 +// vim: tabstop=4 expandtab shiftwidth=4
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/files/test_file_accessor.cc Sun Mar 14 17:17:09 2021 +0100
6.3 @@ -0,0 +1,54 @@
6.4 +#include <stdio.h>
6.5 +#include <string.h>
6.6 +
6.7 +#include "test_file_accessor.h"
6.8 +
6.9 +TestFileAccessor::TestFileAccessor(fileid_t fileid, offset_t size)
6.10 +: Accessor(fileid, size)
6.11 +{
6.12 +}
6.13 +
6.14 +/* Data transfer methods. */
6.15 +
6.16 +void TestFileAccessor::fill(Flexpage *flexpage)
6.17 +{
6.18 + Region *region = flexpage->region;
6.19 + offset_t filepos = flexpage->base_offset;
6.20 +
6.21 + /* Tag the region with file state. */
6.22 +
6.23 + region->fill(fileid, filepos);
6.24 +
6.25 + /* Write some data to each page of the flexpage in each region. This
6.26 + allows each page to be tested regardless of how large each flexpage
6.27 + or region is. */
6.28 +
6.29 + offset_t addr = flexpage->base_addr;
6.30 + offset_t limit = addr + flexpage->size;
6.31 +
6.32 + while (addr < limit)
6.33 + {
6.34 + /* Overwrite enough of any previous data to make the new data
6.35 + readable. */
6.36 +
6.37 + char tag[32];
6.38 +
6.39 + sprintf(tag, "%ld:%ld", fileid, filepos);
6.40 +
6.41 + memset((void *) addr, 0, strlen(tag) + 1);
6.42 + strcpy((char *) addr, tag);
6.43 +
6.44 + filepos += PAGE_SIZE;
6.45 + addr += PAGE_SIZE;
6.46 + }
6.47 +}
6.48 +
6.49 +void TestFileAccessor::flush(Flexpage *flexpage)
6.50 +{
6.51 + /* NOTE: Flushing would not necessarily blank the region as this does.
6.52 + Also, a real flush operation would store the memory content. */
6.53 +
6.54 + flexpage->region->flush();
6.55 +}
6.56 +
6.57 +// vim: tabstop=4 expandtab shiftwidth=4
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/files/test_file_accessor.h Sun Mar 14 17:17:09 2021 +0100
7.3 @@ -0,0 +1,19 @@
7.4 +#pragma once
7.5 +
7.6 +#include "accessor.h"
7.7 +
7.8 +/* A file accessor, providing flexpages corresponding to file regions. */
7.9 +
7.10 +class TestFileAccessor : public Accessor
7.11 +{
7.12 +public:
7.13 + explicit TestFileAccessor(fileid_t fileid, offset_t size=0);
7.14 +
7.15 + /* Data transfer methods. */
7.16 +
7.17 + virtual void fill(Flexpage *flexpage);
7.18 +
7.19 + virtual void flush(Flexpage *flexpage);
7.20 +};
7.21 +
7.22 +// vim: tabstop=4 expandtab shiftwidth=4
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/files/test_file_opener.cc Sun Mar 14 17:17:09 2021 +0100
8.3 @@ -0,0 +1,30 @@
8.4 +#include "test_file_accessor.h"
8.5 +#include "test_file_opener.h"
8.6 +
8.7 +#include <stdlib.h>
8.8 +
8.9 +/* Support for providing access to files. */
8.10 +
8.11 +TestFileOpener::TestFileOpener(Accessing *accessing, Paging *paging, Pages *pages,
8.12 + offset_t file_size)
8.13 +: OpenerResource(accessing, paging, pages), _file_size(file_size)
8.14 +{
8.15 +}
8.16 +
8.17 +/* Return a file identifier for the given 'path'. */
8.18 +
8.19 +fileid_t TestFileOpener::get_fileid(const char *path)
8.20 +{
8.21 + /* NOTE: Just convert the path to a number. */
8.22 +
8.23 + return atol(path);
8.24 +}
8.25 +
8.26 +/* Return a new accessor for 'fileid'. */
8.27 +
8.28 +Accessor *TestFileOpener::make_accessor(fileid_t fileid)
8.29 +{
8.30 + return new TestFileAccessor(fileid, _file_size);
8.31 +}
8.32 +
8.33 +// vim: tabstop=4 expandtab shiftwidth=4
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/files/test_file_opener.h Sun Mar 14 17:17:09 2021 +0100
9.3 @@ -0,0 +1,23 @@
9.4 +#pragma once
9.5 +
9.6 +#include "opener_resource.h"
9.7 +
9.8 +/* Support for providing access to files. */
9.9 +
9.10 +class TestFileOpener : public OpenerResource
9.11 +{
9.12 +protected:
9.13 + offset_t _file_size;
9.14 +
9.15 + /* Configurable methods. */
9.16 +
9.17 + virtual fileid_t get_fileid(const char *path);
9.18 +
9.19 + virtual Accessor *make_accessor(fileid_t fileid);
9.20 +
9.21 +public:
9.22 + explicit TestFileOpener(Accessing *accessing, Paging *paging, Pages *pages,
9.23 + offset_t file_size=0);
9.24 +};
9.25 +
9.26 +// vim: tabstop=4 expandtab shiftwidth=4
10.1 --- a/host_file_accessor.cc Sun Mar 14 00:40:21 2021 +0100
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,68 +0,0 @@
10.4 -#include <stdio.h>
10.5 -#include <string.h>
10.6 -#include <sys/types.h>
10.7 -#include <sys/stat.h>
10.8 -
10.9 -#include "host_file_accessor.h"
10.10 -
10.11 -HostFileAccessor::HostFileAccessor(const char *path, fileid_t fileid)
10.12 -: Accessor(fileid), _path(path)
10.13 -{
10.14 - /* Initialise the size of the file. */
10.15 -
10.16 - struct stat buf;
10.17 -
10.18 - if (!stat(_path, &buf))
10.19 - _size = buf.st_size;
10.20 - else
10.21 - _size = 0;
10.22 -}
10.23 -
10.24 -/* Perform any closing operation on the file. */
10.25 -
10.26 -void HostFileAccessor::close()
10.27 -{
10.28 - fclose(_fp);
10.29 -}
10.30 -
10.31 -/* Perform any opening operation on the file. */
10.32 -
10.33 -void HostFileAccessor::open()
10.34 -{
10.35 - _fp = fopen(_path, "r");
10.36 -}
10.37 -
10.38 -/* Data transfer methods. */
10.39 -
10.40 -void HostFileAccessor::fill(Flexpage *flexpage)
10.41 -{
10.42 - /* Obtain the offset and seek in the file. */
10.43 -
10.44 - offset_t filepos = flexpage->base_offset;
10.45 -
10.46 - fseek(_fp, filepos, SEEK_SET);
10.47 -
10.48 - /* Tag the region with file state. */
10.49 -
10.50 - flexpage->region->fill(fileid, filepos);
10.51 -
10.52 - /* Fill the region with file content. */
10.53 -
10.54 - offset_t addr = flexpage->base_addr;
10.55 -
10.56 - size_t nread = fread((void *) addr, sizeof(char), flexpage->size, _fp);
10.57 -
10.58 - /* Pad the flexpage with zero. */
10.59 -
10.60 - memset((void *) (addr + nread), 0, flexpage->size - nread);
10.61 -}
10.62 -
10.63 -void HostFileAccessor::flush(Flexpage *flexpage)
10.64 -{
10.65 - /* NOTE: A real flush operation would store the memory content and update
10.66 - the file size, if appropriate. */
10.67 -
10.68 - flexpage->region->flush();
10.69 -}
10.70 -
10.71 -// vim: tabstop=4 expandtab shiftwidth=4
11.1 --- a/host_file_accessor.h Sun Mar 14 00:40:21 2021 +0100
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,30 +0,0 @@
11.4 -#pragma once
11.5 -
11.6 -#include <stdio.h>
11.7 -
11.8 -#include "accessor.h"
11.9 -
11.10 -/* A host filesystem file accessor, providing flexpages corresponding to file
11.11 - regions. */
11.12 -
11.13 -class HostFileAccessor : public Accessor
11.14 -{
11.15 -protected:
11.16 - const char *_path;
11.17 - FILE *_fp;
11.18 -
11.19 -public:
11.20 - explicit HostFileAccessor(const char *path, fileid_t fileid);
11.21 -
11.22 - virtual void close();
11.23 -
11.24 - virtual void open();
11.25 -
11.26 - /* Data transfer methods. */
11.27 -
11.28 - virtual void fill(Flexpage *flexpage);
11.29 -
11.30 - virtual void flush(Flexpage *flexpage);
11.31 -};
11.32 -
11.33 -// vim: tabstop=4 expandtab shiftwidth=4
12.1 --- a/host_file_opener.cc Sun Mar 14 00:40:21 2021 +0100
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,34 +0,0 @@
12.4 -#include <sys/stat.h>
12.5 -
12.6 -#include "host_file_accessor.h"
12.7 -#include "host_file_opener.h"
12.8 -
12.9 -/* Return a file identifier for the given 'path'. */
12.10 -
12.11 -fileid_t HostFileOpener::get_fileid(const char *path)
12.12 -{
12.13 - struct stat statbuf;
12.14 -
12.15 - /* Obtain the inode number.
12.16 - NOTE: This does not handle errors! */
12.17 -
12.18 - stat(path, &statbuf);
12.19 -
12.20 - _paths.insert(FilePathEntry(statbuf.st_ino, path));
12.21 -
12.22 - return statbuf.st_ino;
12.23 -}
12.24 -
12.25 -/* Return a new accessor for 'fileid'. */
12.26 -
12.27 -Accessor *HostFileOpener::make_accessor(fileid_t fileid)
12.28 -{
12.29 - FilePaths::iterator found = _paths.find(fileid);
12.30 -
12.31 - if (found != _paths.end())
12.32 - return new HostFileAccessor(found->second, fileid);
12.33 - else
12.34 - return NULL;
12.35 -}
12.36 -
12.37 -// vim: tabstop=4 expandtab shiftwidth=4
13.1 --- a/host_file_opener.h Sun Mar 14 00:40:21 2021 +0100
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,36 +0,0 @@
13.4 -#pragma once
13.5 -
13.6 -#include <map>
13.7 -
13.8 -#include "opener_resource.h"
13.9 -
13.10 -
13.11 -
13.12 -/* Collection types. */
13.13 -
13.14 -typedef std::map<fileid_t, const char *> FilePaths;
13.15 -typedef std::pair<fileid_t, const char *> FilePathEntry;
13.16 -
13.17 -
13.18 -
13.19 -/* Support for providing access to files. */
13.20 -
13.21 -class HostFileOpener : public OpenerResource
13.22 -{
13.23 -protected:
13.24 - FilePaths _paths;
13.25 -
13.26 - /* Configurable methods. */
13.27 -
13.28 - virtual fileid_t get_fileid(const char *path);
13.29 -
13.30 - virtual Accessor *make_accessor(fileid_t fileid);
13.31 -
13.32 -public:
13.33 - explicit HostFileOpener(Accessing *accessing, Paging *paging, Pages *pages)
13.34 - : OpenerResource(accessing, paging, pages)
13.35 - {
13.36 - }
13.37 -};
13.38 -
13.39 -// vim: tabstop=4 expandtab shiftwidth=4
14.1 --- a/test_file_accessor.cc Sun Mar 14 00:40:21 2021 +0100
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,54 +0,0 @@
14.4 -#include <stdio.h>
14.5 -#include <string.h>
14.6 -
14.7 -#include "test_file_accessor.h"
14.8 -
14.9 -TestFileAccessor::TestFileAccessor(fileid_t fileid, offset_t size)
14.10 -: Accessor(fileid, size)
14.11 -{
14.12 -}
14.13 -
14.14 -/* Data transfer methods. */
14.15 -
14.16 -void TestFileAccessor::fill(Flexpage *flexpage)
14.17 -{
14.18 - Region *region = flexpage->region;
14.19 - offset_t filepos = flexpage->base_offset;
14.20 -
14.21 - /* Tag the region with file state. */
14.22 -
14.23 - region->fill(fileid, filepos);
14.24 -
14.25 - /* Write some data to each page of the flexpage in each region. This
14.26 - allows each page to be tested regardless of how large each flexpage
14.27 - or region is. */
14.28 -
14.29 - offset_t addr = flexpage->base_addr;
14.30 - offset_t limit = addr + flexpage->size;
14.31 -
14.32 - while (addr < limit)
14.33 - {
14.34 - /* Overwrite enough of any previous data to make the new data
14.35 - readable. */
14.36 -
14.37 - char tag[32];
14.38 -
14.39 - sprintf(tag, "%ld:%ld", fileid, filepos);
14.40 -
14.41 - memset((void *) addr, 0, strlen(tag) + 1);
14.42 - strcpy((char *) addr, tag);
14.43 -
14.44 - filepos += PAGE_SIZE;
14.45 - addr += PAGE_SIZE;
14.46 - }
14.47 -}
14.48 -
14.49 -void TestFileAccessor::flush(Flexpage *flexpage)
14.50 -{
14.51 - /* NOTE: Flushing would not necessarily blank the region as this does.
14.52 - Also, a real flush operation would store the memory content. */
14.53 -
14.54 - flexpage->region->flush();
14.55 -}
14.56 -
14.57 -// vim: tabstop=4 expandtab shiftwidth=4
15.1 --- a/test_file_accessor.h Sun Mar 14 00:40:21 2021 +0100
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,19 +0,0 @@
15.4 -#pragma once
15.5 -
15.6 -#include "accessor.h"
15.7 -
15.8 -/* A file accessor, providing flexpages corresponding to file regions. */
15.9 -
15.10 -class TestFileAccessor : public Accessor
15.11 -{
15.12 -public:
15.13 - explicit TestFileAccessor(fileid_t fileid, offset_t size=0);
15.14 -
15.15 - /* Data transfer methods. */
15.16 -
15.17 - virtual void fill(Flexpage *flexpage);
15.18 -
15.19 - virtual void flush(Flexpage *flexpage);
15.20 -};
15.21 -
15.22 -// vim: tabstop=4 expandtab shiftwidth=4
16.1 --- a/test_file_opener.cc Sun Mar 14 00:40:21 2021 +0100
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,30 +0,0 @@
16.4 -#include "test_file_accessor.h"
16.5 -#include "test_file_opener.h"
16.6 -
16.7 -#include <stdlib.h>
16.8 -
16.9 -/* Support for providing access to files. */
16.10 -
16.11 -TestFileOpener::TestFileOpener(Accessing *accessing, Paging *paging, Pages *pages,
16.12 - offset_t file_size)
16.13 -: OpenerResource(accessing, paging, pages), _file_size(file_size)
16.14 -{
16.15 -}
16.16 -
16.17 -/* Return a file identifier for the given 'path'. */
16.18 -
16.19 -fileid_t TestFileOpener::get_fileid(const char *path)
16.20 -{
16.21 - /* NOTE: Just convert the path to a number. */
16.22 -
16.23 - return atol(path);
16.24 -}
16.25 -
16.26 -/* Return a new accessor for 'fileid'. */
16.27 -
16.28 -Accessor *TestFileOpener::make_accessor(fileid_t fileid)
16.29 -{
16.30 - return new TestFileAccessor(fileid, _file_size);
16.31 -}
16.32 -
16.33 -// vim: tabstop=4 expandtab shiftwidth=4
17.1 --- a/test_file_opener.h Sun Mar 14 00:40:21 2021 +0100
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,23 +0,0 @@
17.4 -#pragma once
17.5 -
17.6 -#include "opener_resource.h"
17.7 -
17.8 -/* Support for providing access to files. */
17.9 -
17.10 -class TestFileOpener : public OpenerResource
17.11 -{
17.12 -protected:
17.13 - offset_t _file_size;
17.14 -
17.15 - /* Configurable methods. */
17.16 -
17.17 - virtual fileid_t get_fileid(const char *path);
17.18 -
17.19 - virtual Accessor *make_accessor(fileid_t fileid);
17.20 -
17.21 -public:
17.22 - explicit TestFileOpener(Accessing *accessing, Paging *paging, Pages *pages,
17.23 - offset_t file_size=0);
17.24 -};
17.25 -
17.26 -// vim: tabstop=4 expandtab shiftwidth=4