vfs: check userland buffers before reading them.
[haiku.git] / src / tools / fs_shell / stat_util.h
blobd3c912502fe108de47bae6d48a520da81d74e4a3
1 /*
2 * Copyright 2005-2007, Ingo Weinhold, bonefish@users.sf.net.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _FSSH_STAT_UTIL_H
6 #define _FSSH_STAT_UTIL_H
8 #include <sys/stat.h>
10 #include "fssh_defs.h"
11 #include "fssh_stat.h"
14 namespace FSShell {
16 mode_t to_platform_mode(fssh_mode_t mode);
18 void from_platform_stat(const struct stat *st, struct fssh_stat *fsshStat);
19 void to_platform_stat(const struct fssh_stat *fsshStat, struct stat *st);
21 extern int to_platform_open_mode(int fsshMode);
23 } // namespace FSShell
26 #endif // _FSSH_STAT_UTIL_H