Changeset 745 for trunk/server/source3/modules/gpfs.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/modules/gpfs.c
r599 r745 19 19 20 20 #include "includes.h" 21 #include "smbd/smbd.h" 21 22 22 23 #ifdef HAVE_GPFS 23 24 25 #include "libcli/security/security.h" 24 26 #include "gpfs_gpl.h" 25 27 #include "vfs_gpfs.h" … … 39 41 static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs); 40 42 static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length); 43 static int (*gpfs_lib_init_fn)(int flags); 41 44 42 45 bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, … … 133 136 } 134 137 135 int smbd_gpfs_ftrunc tate(int fd, gpfs_off64_t length)136 { 137 138 139 140 141 142 138 int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length) 139 { 140 if (!gpfs_do_ftruncate || (gpfs_ftruncate_fn == NULL)) { 141 errno = ENOSYS; 142 return -1; 143 } 144 145 return gpfs_ftruncate_fn(fd, length); 143 146 } 144 147 … … 186 189 DEBUG(10, ("gpfs_set_winattrs_path:open call %s\n",pathname)); 187 190 return gpfs_set_winattrs_path_fn(pathname,flags, attrs); 191 } 192 193 void smbd_gpfs_lib_init() 194 { 195 if (gpfs_lib_init_fn) { 196 int rc = gpfs_lib_init_fn(0); 197 DEBUG(10, ("gpfs_lib_init() finished with rc %d " 198 "and errno %d\n", rc, errno)); 199 } else { 200 DEBUG(10, ("libgpfs lacks gpfs_lib_init\n")); 201 } 188 202 } 189 203 … … 249 263 init_gpfs_function(&gpfs_set_winattrs_path_fn,"gpfs_set_winattrs_path"); 250 264 init_gpfs_function(&gpfs_get_winattrs_fn,"gpfs_get_winattrs"); 251 init_gpfs_function(&gpfs_ftruncate_fn,"gpfs_ftruncate"); 265 init_gpfs_function(&gpfs_ftruncate_fn, "gpfs_ftruncate"); 266 init_gpfs_function(&gpfs_lib_init_fn,"gpfs_lib_init"); 252 267 253 268 gpfs_getrealfilename = lp_parm_bool(-1, "gpfs", "getrealfilename", 254 269 True); 255 270 gpfs_winattr = lp_parm_bool(-1, "gpfs", "winattr", False); 256 257 271 gpfs_do_ftruncate = lp_parm_bool(-1, "gpfs", "ftruncate", True); 258 272 … … 311 325 } 312 326 327 void smbd_gpfs_lib_init() 328 { 329 return; 330 } 331 313 332 void init_gpfs(void) 314 333 {
Note:
See TracChangeset
for help on using the changeset viewer.