mirror of
https://review.haiku-os.org/haiku
synced 2025-01-22 06:16:03 +01:00
617ed3e4a9
old interface is completely done in userland ATM. It becomes more and more obvious that we probably need to provide the kernel add-on with a bit more information about what the client FS interface supports in the first place, so we can save unnecessary trips to the userland. Opening/closing attributes for a FS using the old style interface could be handled completely in the kernel add-on, for instance (even if we lose a bit of accuracy wrt to open modes etc.). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20258 a95241bf-73f2-0310-859d-f6bbb57e9c96
57 lines
1.1 KiB
C++
57 lines
1.1 KiB
C++
// userlandfs_ioctl.h
|
|
|
|
#ifndef USERLAND_FS_IOCTL_H
|
|
#define USERLAND_FS_IOCTL_H
|
|
|
|
#include <Drivers.h>
|
|
|
|
// the ioctl command we use for tunnelling our commands
|
|
enum {
|
|
USERLANDFS_IOCTL = B_DEVICE_OP_CODES_END + 666,
|
|
};
|
|
|
|
// the supported commands
|
|
enum {
|
|
USERLAND_IOCTL_PUT_ALL_PENDING_VNODES = 1,
|
|
};
|
|
|
|
// the length of the magic we use
|
|
enum {
|
|
USERLAND_IOCTL_MAGIC_LENGTH = 20,
|
|
};
|
|
|
|
// the version of the ioctl protocol
|
|
enum {
|
|
USERLAND_IOCTL_CURRENT_VERSION = 1,
|
|
};
|
|
|
|
// the errors
|
|
enum {
|
|
USERLAND_IOCTL_STILL_CONNECTED = B_ERRORS_END + 666,
|
|
USERLAND_IOCTL_VNODE_COUNTING_DISABLED,
|
|
USERLAND_IOCTL_OPEN_FILES,
|
|
USERLAND_IOCTL_OPEN_DIRECTORIES,
|
|
USERLAND_IOCTL_OPEN_ATTRIBUTE_DIRECTORIES,
|
|
USERLAND_IOCTL_OPEN_ATTRIBUTES,
|
|
USERLAND_IOCTL_OPEN_INDEX_DIRECTORIES,
|
|
USERLAND_IOCTL_OPEN_QUERIES,
|
|
};
|
|
|
|
namespace UserlandFSUtil {
|
|
|
|
struct userlandfs_ioctl {
|
|
char magic[USERLAND_IOCTL_MAGIC_LENGTH];
|
|
int version;
|
|
int command;
|
|
status_t error;
|
|
};
|
|
|
|
extern const char kUserlandFSIOCtlMagic[USERLAND_IOCTL_MAGIC_LENGTH];
|
|
|
|
} // namespace UserlandFSUtil
|
|
|
|
using UserlandFSUtil::userlandfs_ioctl;
|
|
using UserlandFSUtil::kUserlandFSIOCtlMagic;
|
|
|
|
#endif // USERLAND_FS_IOCTL_H
|