vfs: check userland buffers before reading them.
[haiku.git] / src / tools / fs_shell / partition_support.h
blobc4dd5c7196353a78d2ddf9d53cbb191ecf073849
1 /*
2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _FSSH_PARTITION_SUPPORT_H
6 #define _FSSH_PARTITION_SUPPORT_H
8 #include "fssh_defs.h"
9 #include "fssh_stat.h"
12 namespace FSShell {
15 void add_file_restriction(const char* fileName, fssh_off_t startOffset,
16 fssh_off_t endOffset);
18 void restricted_file_opened(int fd);
19 void restricted_file_duped(int oldFD, int newFD);
20 void restricted_file_closed(int fd);
22 int restricted_file_restrict_io(int fd, fssh_off_t& pos, fssh_off_t size);
23 void restricted_file_restrict_stat(struct fssh_stat* st);
26 } // namespace FSShell
29 #endif // _FSSH_PARTITION_SUPPORT_H