bfs: Use the QueryParserUtils instead of its own copy.

* Ingo copied the methods into a shared location, and then obviously
  "forgot" to let BFS use them. As a side note for Ingo: the complete
  error GCC reported was "std::fssh_size_t" not defined with the macro
  wrapper as code location. The actual problem was a "using std::size_t"
  in some C++ header that accidentally got included after the wrapper.
* The shared Query code is not yet used. That'll be done another time.
* Renamed BFS_SHELL define to FS_SHELL, such that QueryParserUtils can be
  used in any file system shell, not just the bfs_shell.
This commit is contained in:
Axel Dörfler
2014-07-09 22:54:39 +02:00
parent ba32021824
commit de9c061339
16 changed files with 102 additions and 432 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2013, Axel Dörfler, [email protected].
* Copyright 2001-2014, Axel Dörfler, [email protected].
* This file may be used under the terms of the MIT License.
*/
@@ -18,7 +18,7 @@
#include "bfs_disk_system.h"
// TODO: temporary solution as long as there is no public I/O requests API
#ifndef BFS_SHELL
#ifndef FS_SHELL
# include <io_requests.h>
# include <util/fs_trim_support.h>
#endif
@@ -487,7 +487,7 @@ bfs_io(fs_volume* _volume, fs_vnode* _node, void* _cookie, io_request* request)
Volume* volume = (Volume*)_volume->private_volume;
Inode* inode = (Inode*)_node->private_node;
#ifndef BFS_SHELL
#ifndef FS_SHELL
if (io_request_is_write(request) && volume->IsReadOnly()) {
notify_io_request(request, B_READ_ONLY_DEVICE);
return B_READ_ONLY_DEVICE;
@@ -495,7 +495,7 @@ bfs_io(fs_volume* _volume, fs_vnode* _node, void* _cookie, io_request* request)
#endif
if (inode->FileCache() == NULL) {
#ifndef BFS_SHELL
#ifndef FS_SHELL
notify_io_request(request, B_BAD_VALUE);
#endif
RETURN_ERROR(B_BAD_VALUE);
@@ -625,7 +625,7 @@ bfs_ioctl(fs_volume* _volume, fs_vnode* _node, void* _cookie, uint32 cmd,
Volume* volume = (Volume*)_volume->private_volume;
switch (cmd) {
#ifndef BFS_SHELL
#ifndef FS_SHELL
case B_TRIM_DEVICE:
{
fs_trim_data* trimData;