From fe526bb32b7d65be10a05d2525b36f004215b003 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 28 Mar 2012 13:01:19 +1100 Subject: build: Remove sys_opendir wrapper --- source3/client/client.c | 2 +- source3/include/proto.h | 1 - source3/lib/system.c | 9 --------- source3/modules/vfs_default.c | 2 +- source3/modules/vfs_netatalk.c | 2 +- source3/param/loadparm.c | 4 ++-- source3/rpc_server/samr/srv_samr_chgpasswd.c | 2 +- source3/utils/net_usershare.c | 6 +++--- 8 files changed, 9 insertions(+), 19 deletions(-) (limited to 'source3') diff --git a/source3/client/client.c b/source3/client/client.c index 95500b0862..0fb3e3ff2f 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2082,7 +2082,7 @@ static int file_find(struct file_list **list, const char *directory, bool isdir; const char *dname; - dir = sys_opendir(directory); + dir = opendir(directory); if (!dir) return -1; diff --git a/source3/include/proto.h b/source3/include/proto.h index 654735a483..bd12e5364e 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -337,7 +337,6 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf, int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len); int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OFF_T len); void kernel_flock(int fd, uint32 share_mode, uint32 access_mask); -SMB_STRUCT_DIR *sys_opendir(const char *name); SMB_STRUCT_DIR *sys_fdopendir(int fd); SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp); void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset); diff --git a/source3/lib/system.c b/source3/lib/system.c index 421beb53fd..9705dda697 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -617,15 +617,6 @@ void kernel_flock(int fd, uint32 share_mode, uint32 access_mask) -/******************************************************************* - An opendir wrapper. -********************************************************************/ - -SMB_STRUCT_DIR *sys_opendir(const char *name) -{ - return opendir(name); -} - /******************************************************************* An fdopendir wrapper. Ugly hack - we need dirfd for this to work correctly in the diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 615c0296b4..1c55fe7bbe 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -348,7 +348,7 @@ static SMB_STRUCT_DIR *vfswrap_opendir(vfs_handle_struct *handle, const char *f SMB_STRUCT_DIR *result; START_PROFILE(syscall_opendir); - result = sys_opendir(fname); + result = opendir(fname); END_PROFILE(syscall_opendir); return result; } diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c index 95de44137b..12d1f66c58 100644 --- a/source3/modules/vfs_netatalk.c +++ b/source3/modules/vfs_netatalk.c @@ -157,7 +157,7 @@ static void atalk_rrmdir(TALLOC_CTX *ctx, char *path) if (!path) return; - dir = sys_opendir(path); + dir = opendir(path); if (!dir) return; while (NULL != (dent = sys_readdir(dir))) { diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index d48ee795e8..599b48d89c 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -8388,7 +8388,7 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx, } /* Ensure this is pointing to a directory. */ - dp = sys_opendir(sharepath); + dp = opendir(sharepath); if (!dp) { DEBUG(2,("parse_usershare_file: share %s path %s is not a directory.\n", @@ -8798,7 +8798,7 @@ int load_usershare_shares(struct smbd_server_connection *sconn, } } - dp = sys_opendir(usersharepath); + dp = opendir(usersharepath); if (!dp) { DEBUG(0,("load_usershare_shares:: failed to open directory %s. %s\n", usersharepath, strerror(errno) )); diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c index b083fb94bf..795471b580 100644 --- a/source3/rpc_server/samr/srv_samr_chgpasswd.c +++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c @@ -101,7 +101,7 @@ static int findpty(char **slave) return (-1); } - dirp = sys_opendir("/dev"); + dirp = opendir("/dev"); if (!dirp) { SAFE_FREE(line); return (-1); diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c index 8f77f73994..b9e0cb5152 100644 --- a/source3/utils/net_usershare.c +++ b/source3/utils/net_usershare.c @@ -217,7 +217,7 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours) if (!basepath) { return -1; } - dp = sys_opendir(basepath); + dp = opendir(basepath); if (!dp) { d_fprintf(stderr, _("get_share_list: cannot open usershare directory %s. " @@ -556,7 +556,7 @@ static int count_num_usershares(void) return -1; } - dp = sys_opendir(basepath); + dp = opendir(basepath); if (!dp) { d_fprintf(stderr, _("count_num_usershares: cannot open usershare " @@ -1104,7 +1104,7 @@ int net_usershare(struct net_context *c, int argc, const char **argv) return -1; } - dp = sys_opendir(lp_usershare_path()); + dp = opendir(lp_usershare_path()); if (!dp) { int err = errno; d_fprintf(stderr, -- cgit