return rc;
}
-int lock_mtab(void)
+static int lock_mtab(void)
{
int rc;
}
-void unlock_mtab(void)
+static void unlock_mtab(void)
{
unlink(MOUNTED_LOCK);
}
-int remove_from_mtab(char * mountpoint)
+static int remove_from_mtab(char * mountpoint)
{
int rc;
int num_matches;
#define TESTDIR "test.dir"
static int test_readdir_os2_delete_ret;
+int test_readdir_os2_delete(void);
#define FAILED(d) (fprintf(stderr, "Failed for %s - %d = %s\n", d, errno, strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
struct torture_context;
-bool torture_local_replace(struct torture_context *torture)
+static bool torture_local_replace(struct torture_context *torture)
{
bool ret = true;
ret &= test_ftruncate();
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_afsacl_init(void);
NTSTATUS vfs_afsacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "afsacl",
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_aixacl_init(void);
NTSTATUS vfs_aixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "aixacl",
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_aixacl2_init(void);
NTSTATUS vfs_aixacl2_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, AIXACL2_MODULE_NAME,
return result;
}
+NTSTATUS vfs_audit_init(void);
NTSTATUS vfs_audit_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "audit", audit_op_tuples);
* -------------------------------------------------------------------------
*/
+NTSTATUS vfs_cacheprime_init(void);
NTSTATUS vfs_cacheprime_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, cprime_ops);
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_cap_init(void);
NTSTATUS vfs_cap_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "cap", cap_op_tuples);
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_catia_init(void);
NTSTATUS vfs_catia_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "catia",
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_commit_init(void);
NTSTATUS vfs_commit_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, commit_ops);
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_default_init(void);
NTSTATUS vfs_default_init(void)
{
unsigned int needed = SMB_VFS_OP_LAST + 1; /* convert from index to count */
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_default_quota_init(void);
NTSTATUS vfs_default_quota_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, DEFAULT_QUOTA_NAME, default_quota_ops);
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_expand_msdfs_init(void);
NTSTATUS vfs_expand_msdfs_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "expand_msdfs",
return result;
}
+NTSTATUS vfs_extd_audit_init(void);
NTSTATUS vfs_extd_audit_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "extd_audit", audit_op_tuples);
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_fake_perms_init(void);
NTSTATUS vfs_fake_perms_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_perms", fake_perms_ops);
}
+NTSTATUS vfs_full_audit_init(void);
NTSTATUS vfs_full_audit_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
};
+NTSTATUS vfs_gpfs_init(void);
NTSTATUS vfs_gpfs_init(void)
{
init_gpfs();
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_hpuxacl_init(void);
NTSTATUS vfs_hpuxacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "hpuxacl",
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_irixacl_init(void);
NTSTATUS vfs_irixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "irixacl",
/* Directory operations */
-SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
SMB_STRUCT_DIR *ret = 0;
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_netatalk_init(void);
NTSTATUS vfs_netatalk_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "netatalk", atalk_ops);
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_posixacl_init(void);
NTSTATUS vfs_posixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "posixacl",
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_prealloc_init(void);
NTSTATUS vfs_prealloc_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_readonly_init(void);
NTSTATUS vfs_readonly_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE_NAME, readonly_op_tuples);
return rc;
}
+NTSTATUS vfs_recycle_init(void);
NTSTATUS vfs_recycle_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "recycle", recycle_ops);
return((SMB_STRUCT_DIR *)dirp);
}
-SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
dirp->pos = 0 ;
}
-int shadow_copy_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static int shadow_copy_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_shadow_copy_init(void);
NTSTATUS vfs_shadow_copy_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy", shadow_copy_ops);
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_solarisacl_init(void);
NTSTATUS vfs_solarisacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "solarisacl",
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_tru64acl_init(void);
NTSTATUS vfs_tru64acl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "tru64acl",
lib/util_str.c as I really don't want to have to link in any other
objects if I can possibly avoid it. */
-BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
+static BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
{
char *s;
BOOL quoted;
* lp_parm_string is only used to let old modules find this symbol
*/
#undef lp_parm_string
+ char *lp_parm_string(const char *servicename, const char *type, const char *option);
char *lp_parm_string(const char *servicename, const char *type, const char *option)
{
return lp_parm_talloc_string(lp_servicenumber(servicename), type, option, NULL);
enum lock_op {OP_LOCK, OP_UNLOCK, OP_REOPEN};
-const char *lock_op_type(int op)
+static const char *lock_op_type(int op)
{
if (op == WRITE_LOCK) return "write";
else if (op == READ_LOCK) return "read";
else return "other";
}
-const char *lock_op_name(enum lock_op op)
+static const char *lock_op_name(enum lock_op op)
{
if (op == OP_LOCK) return "lock";
else if (op == OP_UNLOCK) return "unlock";
extern BOOL AllowDebugChange;
/* a test fn for LANMAN mask support */
-int ms_fnmatch_lanman_core(const char *pattern, const char *string)
+static int ms_fnmatch_lanman_core(const char *pattern, const char *string)
{
const char *p = pattern, *n = string;
char c;
return 0;
}
-int ms_fnmatch_lanman(const char *pattern, const char *string)
+static int ms_fnmatch_lanman(const char *pattern, const char *string)
{
if (!strpbrk(pattern, "?*<>\"")) {
if (strcmp(string,"..") == 0)
/*****************************************************
return a connection to a server
*******************************************************/
-struct cli_state *connect_one(char *share)
+static struct cli_state *connect_one(char *share)
{
struct cli_state *c;
struct nmb_name called, calling;
/****************************************************************************
a useful function for testing the message system
****************************************************************************/
-void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
+static void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
{
pong_count++;
}
return( *state );
} /* dbg_char2token */
+void dbg_test( void );
void dbg_test( void )
/* ------------------------------------------------------------------------ **
* Simple test function.
printf( "\t<None specified>\n");
}
-int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
{
if ( argc < 3 ) {
return 0;
}
-int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
{
FILE *f1;
char *argfname;
static hdr_tcp_t HDR_TCP = {139, 139, 0, 0, 0x50, 0, 0, 0, 0};
-void print_pcap_header(FILE *out)
+static void print_pcap_header(FILE *out)
{
struct tcpdump_file_header h;
h.magic = TCPDUMP_MAGIC;
fwrite(&h, sizeof(struct tcpdump_file_header), 1, out);
}
-void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
+static void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
{
static int i = 0;
struct tcpdump_packet p;
fwrite(data, sizeof(unsigned char), caplen, out);
}
-void print_hex_packet(FILE *out, unsigned char *data, long length)
+static void print_hex_packet(FILE *out, unsigned char *data, long length)
{
long i,cur = 0;
while(cur < length) {
}
}
-void print_netbios_packet(FILE *out, unsigned char *data, long length, long actual_length)
+static void print_netbios_packet(FILE *out, unsigned char *data, long length, long actual_length)
{
unsigned char *newdata; long offset = 0;
long newlen;
unsigned char *curpacket = NULL;
long curpacket_len = 0;
-void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *data_offset, long *data_length)
+static void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *data_offset, long *data_length)
{
unsigned char *buffer;
int tmp; long i;
*_buffer = buffer;
}
-long read_log_data(FILE *in, unsigned char *buffer, long data_length)
+static long read_log_data(FILE *in, unsigned char *buffer, long data_length)
{
long i, addr; char real[2][16]; int ret;
unsigned int tmp;
int nonprompt = 0, quiet = 0, dots = 0, keep_permissions = 0, verbose = 0, send_stdout = 0;
int blocksize = SMB_DEFAULT_BLOCKSIZE;
-int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile);
+static int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile);
-int get_num_cols(void)
+static int get_num_cols(void)
{
#ifdef TIOCGWINSZ
struct winsize ws;
#endif
}
-void change_columns(int sig)
+static void change_columns(int sig)
{
columns = get_num_cols();
}
-void human_readable(off_t s, char *buffer, int l)
+static void human_readable(off_t s, char *buffer, int l)
{
if(s > 1024 * 1024 * 1024) snprintf(buffer, l, "%.2fGb", 1.0 * s / (1024 * 1024 * 1024));
else if(s > 1024 * 1024) snprintf(buffer, l, "%.2fMb", 1.0 * s / (1024 * 1024));
else snprintf(buffer, l, OFF_T_FORMAT"b", (OFF_T_FORMAT_CAST)s);
}
-void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen)
+static void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen)
{
static char hasasked = 0;
char *wgtmp, *usertmp;
free(wgtmp); free(usertmp);
}
-int smb_download_dir(const char *base, const char *name, int resume)
+static int smb_download_dir(const char *base, const char *name, int resume)
{
char path[SMB_MAXPATHLEN];
int dirhandle;
return 1;
}
-char *print_time(long t)
+static char *print_time(long t)
{
static char buffer[100];
int secs, mins, hours;
return buffer;
}
-void print_progress(const char *name, time_t start, time_t now, off_t start_pos, off_t pos, off_t total)
+static void print_progress(const char *name, time_t start, time_t now, off_t start_pos, off_t pos, off_t total)
{
double avg = 0.0;
long eta = -1;
free(filename); free(status);
}
-int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile) {
+static int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile) {
int remotehandle, localhandle;
time_t start_time = time(NULL);
const char *newpath;
return 1;
}
-void clean_exit(void)
+static void clean_exit(void)
{
char bs[100];
human_readable(total_bytes, bs, sizeof(bs));
exit(0);
}
-void signal_quit(int v)
+static void signal_quit(int v)
{
clean_exit();
}
-int readrcfile(const char *name, const struct poptOption long_options[])
+static int readrcfile(const char *name, const struct poptOption long_options[])
{
FILE *fd = fopen(name, "r");
int lineno = 0, i;