1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
/*
Unix SMB/Netbios implementation.
Version 1.9.
Wrap disk only vfs functions to sidestep dodgy compilers.
Copyright (C) Tim Potter 1998
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "includes.h"
/* Disk operations */
SMB_BIG_UINT vfswrap_disk_free(char *path, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
{
SMB_BIG_UINT result;
result = sys_disk_free(path, bsize, dfree, dsize);
return result;
}
/* Directory operations */
DIR *vfswrap_opendir(char *fname)
{
DIR *result;
result = opendir(fname);
return result;
}
struct dirent *vfswrap_readdir(DIR *dirp)
{
struct dirent *result;
result = readdir(dirp);
return result;
}
int vfswrap_mkdir(char *path, mode_t mode)
{
int result;
result = mkdir(path, mode);
return result;
}
int vfswrap_rmdir(char *path)
{
int result;
result = rmdir(path);
return result;
}
int vfswrap_closedir(DIR *dirp)
{
int result;
result = closedir(dirp);
return result;
}
/* File operations */
int vfswrap_open(char *fname, int flags, mode_t mode)
{
int result;
result = sys_open(fname, flags, mode);
return result;
}
int vfswrap_close(int fd)
{
int result;
result = close(fd);
return result;
}
ssize_t vfswrap_read(int fd, char *data, size_t n)
{
ssize_t result;
result = read(fd, data, n);
return result;
}
ssize_t vfswrap_write(int fd, char *data, size_t n)
{
ssize_t result;
result = write(fd, data, n);
return result;
}
SMB_OFF_T vfswrap_lseek(int filedes, SMB_OFF_T offset, int whence)
{
SMB_OFF_T result;
result = sys_lseek(filedes, offset, whence);
return result;
}
int vfswrap_rename(char *old, char *new)
{
int result;
result = rename(old, new);
return result;
}
void vfswrap_sync_file(struct connection_struct *conn, files_struct *fsp)
{
sys_sync_file(conn, fsp);
}
int vfswrap_stat(char *fname, SMB_STRUCT_STAT *sbuf)
{
int result;
result = sys_stat(fname, sbuf);
return result;
}
int vfswrap_fstat(int fd, SMB_STRUCT_STAT *sbuf)
{
int result;
result = sys_fstat(fd, sbuf);
return result;
}
int vfswrap_lstat(char *path,
SMB_STRUCT_STAT *sbuf)
{
int result;
result = sys_lstat(path, sbuf);
return result;
}
BOOL vfswrap_fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count,
int type)
{
BOOL result;
result = fcntl_lock(fd, op, offset, count, type);
return result;
}
int vfswrap_unlink(char *path)
{
int result;
result = unlink(path);
return result;
}
int vfswrap_chmod(char *path, mode_t mode)
{
int result;
result = chmod(path, mode);
return result;
}
int vfswrap_utime(char *path, struct utimbuf *times)
{
int result;
result = utime(path, times);
return result;
}
|