smbnetfs  0.6.3
About: SMBNetFS is a Linux/FreeBSD filesystem that allow you to use samba/microsoft network in the same manner as the network neighborhood in Microsoft Windows.
  Fossies Dox: smbnetfs-0.6.3.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

function.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <errno.h>
#include <fcntl.h>
#include <dirent.h>
#include <sys/statvfs.h>
#include <sys/types.h>
#include <time.h>
#include <pthread.h>
#include <libsmbclient.h>
#include <glib.h>
#include "common.h"
#include "smbitem.h"
#include "samba.h"
#include "stat_workaround.h"
#include "function.h"
Include dependency graph for function.c:

Go to the source code of this file.

Functions

int function_set_free_space_size (int blocks_count)
 
static int function_get_free_space_size (void)
 
int function_set_quiet_flag (int flag)
 
static int function_get_quiet_flag (void)
 
int function_set_dollar_share_visibility (int flag)
 
static int function_get_dollar_share_visibility (void)
 
int function_set_hidden_hosts_visibility (int flag)
 
static int function_get_hidden_hosts_visibility (void)
 
int function_set_noexec_attr (int flag)
 
static int function_get_noexec_attr (void)
 
static int function_check_xattr_name (const char *name)
 
static samba_fd function_get_fd (struct fuse_file_info *fi)
 
static void function_store_fd (struct fuse_file_info *fi, samba_fd fd)
 
static int function_open (const char *path, struct fuse_file_info *fi)
 
static int function_read (const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
 
static int function_write (const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi)
 
static int function_close (const char *path, struct fuse_file_info *fi)
 
static int function_unlink (const char *path)
 
static int function_rename (const char *from, const char *to)
 
static int function_opendir (const char *path, struct fuse_file_info *fi)
 
static int function_closedir (const char *path, struct fuse_file_info *fi)
 
static int function_readdir (const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi)
 
static int function_mkdir (const char *path, mode_t mode)
 
static int function_rmdir (const char *path)
 
static int function_stat (const char *path, struct stat *stbuf)
 
static int function_fstat (const char *path, struct stat *stbuf, struct fuse_file_info *fi)
 
static int function_ftruncate (const char *path, off_t size, struct fuse_file_info *fi)
 
static int function_chmod (const char *path, mode_t mode)
 
static int function_utimes (const char *path, struct utimbuf *buffer)
 
static int function_setxattr (const char *path, const char *name, const char *value, size_t size, int flags)
 
static int function_getxattr (const char *path, const char *name, char *value, size_t size)
 
static int function_listxattr (const char *path, char *list, size_t size)
 
static int function_removexattr (const char *path, const char *name)
 
static int function_readlink (const char *path, char *buf, size_t size)
 
static int function_mknod (const char *path, mode_t mode, dev_t rdev)
 
static int function_chown (const char *path, uid_t uid, gid_t gid)
 
static int function_truncate (const char *path, off_t size)
 
static int function_statfs (const char *path, struct statvfs *stbuf)
 

Variables

static int function_free_space_size = 0
 
static int function_quiet_flag = 1
 
static int function_show_dollar_shares = 0
 
static int function_show_hidden_hosts = 0
 
static int function_noexec_attr = 0
 
struct fuse_operations smb_oper
 

Function Documentation

◆ function_check_xattr_name()

static int function_check_xattr_name ( const char *  name)
inlinestatic

Definition at line 79 of file function.c.

Referenced by function_getxattr(), function_removexattr(), and function_setxattr().

◆ function_chmod()

static int function_chmod ( const char *  path,
mode_t  mode 
)
static

Definition at line 465 of file function.c.

References DPRINTF, samba_chmod(), SMBITEM_SMB_SHARE_ITEM, and smbitem_what_is().

◆ function_chown()

static int function_chown ( const char *  path,
uid_t  uid,
gid_t  gid 
)
static

Definition at line 545 of file function.c.

References DPRINTF, and function_get_quiet_flag().

◆ function_close()

static int function_close ( const char *  path,
struct fuse_file_info *  fi 
)
static

Definition at line 131 of file function.c.

References DPRINTF, function_get_fd(), and samba_close().

◆ function_closedir()

static int function_closedir ( const char *  path,
struct fuse_file_info *  fi 
)
static

Definition at line 177 of file function.c.

References DPRINTF, function_get_fd(), and samba_closedir().

◆ function_fstat()

static int function_fstat ( const char *  path,
struct stat *  stbuf,
struct fuse_file_info *  fi 
)
static

◆ function_ftruncate()

static int function_ftruncate ( const char *  path,
off_t  size,
struct fuse_file_info *  fi 
)
static

Definition at line 454 of file function.c.

References DPRINTF, function_get_fd(), and samba_ftruncate().

◆ function_get_dollar_share_visibility()

static int function_get_dollar_share_visibility ( void  )
inlinestatic

Definition at line 55 of file function.c.

References function_show_dollar_shares.

Referenced by function_readdir().

◆ function_get_fd()

static samba_fd function_get_fd ( struct fuse_file_info *  fi)
inlinestatic

◆ function_get_free_space_size()

static int function_get_free_space_size ( void  )
static

Definition at line 35 of file function.c.

References function_free_space_size.

Referenced by function_statfs().

◆ function_get_hidden_hosts_visibility()

static int function_get_hidden_hosts_visibility ( void  )
inlinestatic

Definition at line 65 of file function.c.

References function_show_hidden_hosts.

Referenced by function_readdir().

◆ function_get_noexec_attr()

static int function_get_noexec_attr ( void  )
inlinestatic

Definition at line 75 of file function.c.

References function_noexec_attr.

Referenced by function_fstat(), and function_stat().

◆ function_get_quiet_flag()

static int function_get_quiet_flag ( void  )
inlinestatic

Definition at line 45 of file function.c.

References function_quiet_flag.

Referenced by function_chown().

◆ function_getxattr()

static int function_getxattr ( const char *  path,
const char *  name,
char *  value,
size_t  size 
)
static

◆ function_listxattr()

static int function_listxattr ( const char *  path,
char *  list,
size_t  size 
)
static

Definition at line 509 of file function.c.

References DPRINTF, samba_listxattr(), SMBITEM_SMB_SHARE_ITEM, and smbitem_what_is().

◆ function_mkdir()

static int function_mkdir ( const char *  path,
mode_t  mode 
)
static

Definition at line 326 of file function.c.

References DPRINTF, samba_mkdir(), SMBITEM_SMB_SHARE_ITEM, and smbitem_what_is().

◆ function_mknod()

static int function_mknod ( const char *  path,
mode_t  mode,
dev_t  rdev 
)
static

◆ function_open()

static int function_open ( const char *  path,
struct fuse_file_info *  fi 
)
static

◆ function_opendir()

static int function_opendir ( const char *  path,
struct fuse_file_info *  fi 
)
static

◆ function_read()

static int function_read ( const char *  path,
char *  buf,
size_t  size,
off_t  offset,
struct fuse_file_info *  fi 
)
static

Definition at line 103 of file function.c.

References DPRINTF, function_get_fd(), and samba_read().

◆ function_readdir()

◆ function_readlink()

static int function_readlink ( const char *  path,
char *  buf,
size_t  size 
)
static

Definition at line 525 of file function.c.

References DPRINTF, smbitem_readlink(), SMBITEM_SMBNETFS_LINK, and smbitem_what_is().

◆ function_removexattr()

static int function_removexattr ( const char *  path,
const char *  name 
)
static

◆ function_rename()

static int function_rename ( const char *  from,
const char *  to 
)
static

Definition at line 148 of file function.c.

References DPRINTF, samba_rename(), SMBITEM_SMB_SHARE_ITEM, and smbitem_what_is().

◆ function_rmdir()

static int function_rmdir ( const char *  path)
static

Definition at line 333 of file function.c.

References DPRINTF, samba_rmdir(), SMBITEM_SMB_SHARE_ITEM, and smbitem_what_is().

◆ function_set_dollar_share_visibility()

int function_set_dollar_share_visibility ( int  flag)

Definition at line 49 of file function.c.

References DPRINTF, and function_show_dollar_shares.

Referenced by reconfigure_analyse_simple_option().

◆ function_set_free_space_size()

int function_set_free_space_size ( int  blocks_count)

Definition at line 29 of file function.c.

References DPRINTF, and function_free_space_size.

Referenced by reconfigure_analyse_simple_option().

◆ function_set_hidden_hosts_visibility()

int function_set_hidden_hosts_visibility ( int  flag)

Definition at line 59 of file function.c.

References DPRINTF, and function_show_hidden_hosts.

Referenced by reconfigure_analyse_simple_option().

◆ function_set_noexec_attr()

int function_set_noexec_attr ( int  flag)

Definition at line 69 of file function.c.

References DPRINTF, and function_noexec_attr.

Referenced by reconfigure_analyse_simple_option().

◆ function_set_quiet_flag()

int function_set_quiet_flag ( int  flag)

Definition at line 39 of file function.c.

References DPRINTF, and function_quiet_flag.

Referenced by reconfigure_analyse_simple_option().

◆ function_setxattr()

static int function_setxattr ( const char *  path,
const char *  name,
const char *  value,
size_t  size,
int  flags 
)
static

◆ function_stat()

◆ function_statfs()

static int function_statfs ( const char *  path,
struct statvfs *  stbuf 
)
static

Definition at line 571 of file function.c.

References DPRINTF, and function_get_free_space_size().

◆ function_store_fd()

static void function_store_fd ( struct fuse_file_info *  fi,
samba_fd  fd 
)
inlinestatic

Definition at line 88 of file function.c.

Referenced by function_open(), and function_opendir().

◆ function_truncate()

static int function_truncate ( const char *  path,
off_t  size 
)
static

◆ function_unlink()

static int function_unlink ( const char *  path)
static

Definition at line 141 of file function.c.

References DPRINTF, samba_unlink(), SMBITEM_SMB_SHARE_ITEM, and smbitem_what_is().

◆ function_utimes()

static int function_utimes ( const char *  path,
struct utimbuf *  buffer 
)
static

Definition at line 472 of file function.c.

References DPRINTF, samba_utimes(), SMBITEM_SMB_SHARE_ITEM, and smbitem_what_is().

◆ function_write()

static int function_write ( const char *  path,
const char *  buf,
size_t  size,
off_t  offset,
struct fuse_file_info *  fi 
)
static

Definition at line 117 of file function.c.

References DPRINTF, function_get_fd(), and samba_write().

Variable Documentation

◆ function_free_space_size

int function_free_space_size = 0
static

Definition at line 22 of file function.c.

Referenced by function_get_free_space_size(), and function_set_free_space_size().

◆ function_noexec_attr

int function_noexec_attr = 0
static

Definition at line 26 of file function.c.

Referenced by function_get_noexec_attr(), and function_set_noexec_attr().

◆ function_quiet_flag

int function_quiet_flag = 1
static

Definition at line 23 of file function.c.

Referenced by function_get_quiet_flag(), and function_set_quiet_flag().

◆ function_show_dollar_shares

int function_show_dollar_shares = 0
static

◆ function_show_hidden_hosts

int function_show_hidden_hosts = 0
static

◆ smb_oper

struct fuse_operations smb_oper

Definition at line 571 of file function.c.

Referenced by main(), print_help(), and smbnetfs_opt_proc().