1.1 --- a/libfsserver/lib/files/block_file_opener.cc Wed Feb 09 22:30:29 2022 +0100
1.2 +++ b/libfsserver/lib/files/block_file_opener.cc Thu Feb 10 17:55:05 2022 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * An opener for a file employing a rewritable memory area.
1.6 *
1.7 - * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -57,9 +57,14 @@
1.13
1.14 /* Return a new accessor for 'fileid'. */
1.15
1.16 -long BlockFileOpener::make_accessor(const char *path, flags_t flags,
1.17 - fileid_t fileid, Accessor **accessor)
1.18 +long BlockFileOpener::make_accessor(flags_t flags, fileid_t fileid,
1.19 + Accessor **accessor)
1.20 {
1.21 + const char *path = _get_path(fileid);
1.22 +
1.23 + if (path == NULL)
1.24 + return -L4_ENOENT;
1.25 +
1.26 FILE *fp = fopen(path, "r");
1.27
1.28 if (fp == NULL)