3 * Copyright (C) 2002 Florin Malita <mali@go.ro>
5 * This file is part of LUFS, a free userspace filesystem implementation.
6 * See http://lufs.sourceforge.net/ for updates.
8 * LUFS is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * LUFS is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #define LU_MAXDATA 4096
31 #define PTYPE_MOUNT 0x01
32 #define PTYPE_READ 0x02
33 #define PTYPE_WRITE 0x03
34 #define PTYPE_READDIR 0x04
35 #define PTYPE_STAT 0x05
36 #define PTYPE_UMOUNT 0x06
37 #define PTYPE_SETATTR 0x07
38 #define PTYPE_MKDIR 0x08
39 #define PTYPE_RMDIR 0x09
40 #define PTYPE_CREATE 0x0A
41 #define PTYPE_UNLINK 0x0B
42 #define PTYPE_RENAME 0x0C
43 #define PTYPE_OPEN 0x0D
44 #define PTYPE_RELEASE 0x0E
45 #define PTYPE_READLINK 0x0F
46 #define PTYPE_LINK 0x10
47 #define PTYPE_SYMLINK 0x11
48 #define PTYPE_STATFS 0x12
50 #define PTYPE_MAX 0x12
53 #define PTYPE_ERROR 0x100
55 #define PERROR(x) (-(x & (PTYPE_ERROR - 1)) - 1)
56 #define PIS_ERROR(x) (x & PTYPE_ERROR)
59 unsigned short msg_version;
60 unsigned short msg_type;
61 unsigned short msg_datalen;
62 unsigned short msg_pid;
69 unsigned long f_nlink;
73 unsigned long f_atime;
74 unsigned long f_mtime;
75 unsigned long f_ctime;
76 unsigned long f_blksize;
77 unsigned long f_blocks;
81 struct lufs_sbattr{ /* struct statfs64 */
82 unsigned long long sb_bytes;
83 unsigned long long sb_bytes_free;
84 unsigned long long sb_bytes_available;
85 unsigned long long sb_files;
86 unsigned long long sb_ffree;
90 struct lufs_req_readdir{
91 unsigned short offset;
95 struct lufs_req_mkdir{
106 struct lufs_req_open{
111 struct lufs_req_setattr{
112 struct lufs_fattr fattr;