Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/modules/gpfs.c

    r597 r740  
    1919
    2020#include "includes.h"
     21#include "smbd/smbd.h"
    2122
    2223#ifdef HAVE_GPFS
    2324
     25#include "libcli/security/security.h"
    2426#include "gpfs_gpl.h"
    2527#include "vfs_gpfs.h"
     
    3941static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs);
    4042static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length);
     43static int (*gpfs_lib_init_fn)(int flags);
    4144
    4245bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
     
    133136}
    134137
    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);
     138int 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);
    143146}
    144147
     
    186189        DEBUG(10, ("gpfs_set_winattrs_path:open call %s\n",pathname));
    187190        return gpfs_set_winattrs_path_fn(pathname,flags, attrs);
     191}
     192
     193void 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        }
    188202}
    189203
     
    249263        init_gpfs_function(&gpfs_set_winattrs_path_fn,"gpfs_set_winattrs_path");
    250264        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");
    252267
    253268        gpfs_getrealfilename = lp_parm_bool(-1, "gpfs", "getrealfilename",
    254269                                            True);
    255270        gpfs_winattr = lp_parm_bool(-1, "gpfs", "winattr", False);
    256 
    257271        gpfs_do_ftruncate = lp_parm_bool(-1, "gpfs", "ftruncate", True);
    258272
     
    311325}
    312326
     327void smbd_gpfs_lib_init()
     328{
     329        return;
     330}
     331
    313332void init_gpfs(void)
    314333{
Note: See TracChangeset for help on using the changeset viewer.