Changeset 597 for vendor/current/source3/modules/gpfs.c
- Timestamp:
- Jul 2, 2011, 4:01:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/modules/gpfs.c
r414 r597 25 25 #include "vfs_gpfs.h" 26 26 27 static bool gpfs_share_modes;28 static bool gpfs_leases;29 27 static bool gpfs_getrealfilename; 30 28 static bool gpfs_winattr; 29 static bool gpfs_do_ftruncate; 31 30 32 31 static int (*gpfs_set_share_fn)(int fd, unsigned int allow, unsigned int deny); … … 39 38 static int (*gpfs_get_winattrs_path_fn)(char *pathname, struct gpfs_winattr *attrs); 40 39 static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs); 41 40 static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length); 42 41 43 42 bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, … … 47 46 unsigned int deny = GPFS_DENY_NONE; 48 47 int result; 49 50 if (!gpfs_share_modes) {51 return True;52 }53 48 54 49 if (gpfs_set_share_fn == NULL) { … … 97 92 int gpfs_type = GPFS_LEASE_NONE; 98 93 99 if (!gpfs_leases) {100 return True;101 }102 103 94 if (gpfs_set_lease_fn == NULL) { 104 95 errno = EINVAL; … … 140 131 141 132 return gpfs_putacl_fn(pathname, flags, acl); 133 } 134 135 int smbd_gpfs_ftrunctate(int fd, gpfs_off64_t length) 136 { 137 if (!gpfs_do_ftruncate || (gpfs_ftruncate_fn == NULL)) { 138 errno = ENOSYS; 139 return -1; 140 } 141 142 return gpfs_ftruncate_fn(fd, length); 142 143 } 143 144 … … 248 249 init_gpfs_function(&gpfs_set_winattrs_path_fn,"gpfs_set_winattrs_path"); 249 250 init_gpfs_function(&gpfs_get_winattrs_fn,"gpfs_get_winattrs"); 250 251 252 gpfs_share_modes = lp_parm_bool(-1, "gpfs", "sharemodes", True); 253 gpfs_leases = lp_parm_bool(-1, "gpfs", "leases", True); 251 init_gpfs_function(&gpfs_ftruncate_fn,"gpfs_ftruncate"); 252 254 253 gpfs_getrealfilename = lp_parm_bool(-1, "gpfs", "getrealfilename", 255 254 True); 256 255 gpfs_winattr = lp_parm_bool(-1, "gpfs", "winattr", False); 256 257 gpfs_do_ftruncate = lp_parm_bool(-1, "gpfs", "ftruncate", True); 257 258 258 259 return;
Note:
See TracChangeset
for help on using the changeset viewer.