⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 skel_opaque.c

📁 samba-3.0.22.tar.gz 编译smb服务器的源码
💻 C
📖 第 1 页 / 共 2 页
字号:
/*  * Skeleton VFS module.  Implements passthrough operation of all VFS * calls to disk functions. * * Copyright (C) Tim Potter, 1999-2000 * Copyright (C) Alexander Bokovoy, 2002 * Copyright (C) Stefan (metze) Metzmacher, 2003 * * 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"/* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE    SAMBA DEVELOPERS GUIDE!!!!!! *//* If you take this file as template for your module * please make sure that you remove all vfswrap_* functions and  * implement your own function!! * * for functions you didn't want to provide implement dummy functions * witch return ERROR and errno = ENOSYS; ! * * --metze */static int skel_connect(vfs_handle_struct *handle, connection_struct *conn, const char *service, const char *user)    {	return 0;}static void skel_disconnect(vfs_handle_struct *handle, connection_struct *conn){	return;}static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle, connection_struct *conn, const char *path,	BOOL small_query, SMB_BIG_UINT *bsize,	SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize){	return vfswrap_disk_free(NULL, conn, path, small_query, bsize, 					 dfree, dsize);}static int skel_get_quota(vfs_handle_struct *handle, connection_struct *conn, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq){	return vfswrap_get_quota(NULL, conn, qtype, id, dq);}static int skel_set_quota(vfs_handle_struct *handle, connection_struct *conn, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq){	return vfswrap_set_quota(NULL, conn, qtype, id, dq);}static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels){	return vfswrap_get_shadow_copy_data(NULL, fsp, shadow_copy_data, labels);}static int skel_statvfs(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path, struct vfs_statvfs_struct *statbuf){	return vfswrap_statvfs(NULL, conn, path, statbuf);}static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr){	return vfswrap_opendir(NULL, conn, fname, mask, attr);}static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp){	return vfswrap_readdir(NULL, conn, dirp);}static void skel_seekdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp, long offset){	return vfswrap_seekdir(NULL, conn, dirp, offset);}static long skel_telldir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp){	return vfswrap_telldir(NULL, conn, dirp);}static void skel_rewinddir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp){	return vfswrap_rewinddir(NULL, conn, dirp);}static int skel_mkdir(vfs_handle_struct *handle, connection_struct *conn, const char *path, mode_t mode){	return vfswrap_mkdir(NULL, conn, path, mode);}static int skel_rmdir(vfs_handle_struct *handle, connection_struct *conn, const char *path){	return vfswrap_rmdir(NULL, conn, path);}static int skel_closedir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dir){	return vfswrap_closedir(NULL, conn, dir);}static int skel_open(vfs_handle_struct *handle, connection_struct *conn, const char *fname, int flags, mode_t mode){	return vfswrap_open(NULL, conn, fname, flags, mode);}static int skel_close(vfs_handle_struct *handle, files_struct *fsp, int fd){	return vfswrap_close(NULL, fsp, fd);}static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t n){	return vfswrap_read(NULL, fsp, fd, data, n);}static ssize_t skel_pread(vfs_handle_struct *handle, struct files_struct *fsp, int fd, void *data, size_t n, SMB_OFF_T offset){	return vfswrap_pread(NULL, fsp, fd, data, n, offset);}static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n){	return vfswrap_write(NULL, fsp, fd, data, n);}ssize_t skel_pwrite(vfs_handle_struct *handle, struct files_struct *fsp, int fd, const void *data, size_t n, SMB_OFF_T offset){	return vfswrap_pwrite(NULL, fsp, fd, data, n, offset);}static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, int filedes, SMB_OFF_T offset, int whence){	return vfswrap_lseek(NULL, fsp, filedes, offset, whence);}static int skel_rename(vfs_handle_struct *handle, connection_struct *conn, const char *oldname, const char *newname){	return vfswrap_rename(NULL, conn, oldname, newname);}static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp, int fd){	return vfswrap_fsync(NULL, fsp, fd);}static int skel_stat(vfs_handle_struct *handle, connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf){	return vfswrap_stat(NULL, conn, fname, sbuf);}static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf){	return vfswrap_fstat(NULL, fsp, fd, sbuf);}static int skel_lstat(vfs_handle_struct *handle, connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf){	return vfswrap_lstat(NULL, conn, path, sbuf);}static int skel_unlink(vfs_handle_struct *handle, connection_struct *conn, const char *path){	return vfswrap_unlink(NULL, conn, path);}static int skel_chmod(vfs_handle_struct *handle, connection_struct *conn, const char *path, mode_t mode){	return vfswrap_chmod(NULL, conn, path, mode);}static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode){	return vfswrap_fchmod(NULL, fsp, fd, mode);}static int skel_chown(vfs_handle_struct *handle, connection_struct *conn, const char *path, uid_t uid, gid_t gid){	return vfswrap_chown(NULL, conn, path, uid, gid);}static int skel_fchown(vfs_handle_struct *handle, files_struct *fsp, int fd, uid_t uid, gid_t gid){	return vfswrap_fchown(NULL, fsp, fd, uid, gid);}static int skel_chdir(vfs_handle_struct *handle, connection_struct *conn, const char *path){	return vfswrap_chdir(NULL, conn, path);}static char *skel_getwd(vfs_handle_struct *handle, connection_struct *conn, char *buf){	return vfswrap_getwd(NULL, conn, buf);}static int skel_utime(vfs_handle_struct *handle, connection_struct *conn, const char *path, struct utimbuf *times){	return vfswrap_utime(NULL, conn, path, times);}static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T offset){	return vfswrap_ftruncate(NULL, fsp, fd, offset);}static BOOL skel_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type){	return vfswrap_lock(NULL, fsp, fd, op, offset, count, type);}static int skel_symlink(vfs_handle_struct *handle, connection_struct *conn, const char *oldpath, const char *newpath){	return vfswrap_symlink(NULL, conn, oldpath, newpath);}static int skel_readlink(vfs_handle_struct *handle, connection_struct *conn, const char *path, char *buf, size_t bufsiz){	return vfswrap_readlink(NULL, conn, path, buf, bufsiz);}static int skel_link(vfs_handle_struct *handle, connection_struct *conn, const char *oldpath, const char *newpath){	return vfswrap_link(NULL, conn, oldpath, newpath);}static int skel_mknod(vfs_handle_struct *handle, connection_struct *conn, const char *path, mode_t mode, SMB_DEV_T dev){	return vfswrap_mknod(NULL, conn, path, mode, dev);}static char *skel_realpath(vfs_handle_struct *handle, connection_struct *conn, const char *path, char *resolved_path){	return vfswrap_realpath(NULL, conn, path, resolved_path);}static size_t skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info, struct security_descriptor_info **ppdesc){	errno = ENOSYS;	return 0;}static size_t skel_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info, struct security_descriptor_info **ppdesc){	errno = ENOSYS;	return 0;}static BOOL skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd){	errno = ENOSYS;	return False;}static BOOL skel_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd){	errno = ENOSYS;	return False;}static int skel_chmod_acl(vfs_handle_struct *handle, connection_struct *conn, const char *name, mode_t mode){	errno = ENOSYS;	return -1;}static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode){	errno = ENOSYS;	return -1;}static int skel_sys_acl_get_entry(vfs_handle_struct *handle, connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p){	errno = ENOSYS;	return -1;}static int skel_sys_acl_get_tag_type(vfs_handle_struct *handle, connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p){	errno = ENOSYS;	return -1;}static int skel_sys_acl_get_permset(vfs_handle_struct *handle, connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p){	errno = ENOSYS;	return -1;}static void *skel_sys_acl_get_qualifier(vfs_handle_struct *handle, connection_struct *conn, SMB_ACL_ENTRY_T entry_d){	errno = ENOSYS;	return NULL;}static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle, connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type){	errno = ENOSYS;	return NULL;}static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle, files_struct *fsp, int fd){	errno = ENOSYS;	return NULL;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -