build: Remove sys_opendir wrapper
authorAndrew Bartlett <abartlet@samba.org>
Wed, 28 Mar 2012 02:01:19 +0000 (13:01 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2012 00:39:09 +0000 (02:39 +0200)
libgpo/gpext/gpext.c
source3/client/client.c
source3/include/proto.h
source3/lib/system.c
source3/modules/vfs_default.c
source3/modules/vfs_netatalk.c
source3/param/loadparm.c
source3/rpc_server/samr/srv_samr_chgpasswd.c
source3/utils/net_usershare.c

index 1f86b5f5d71d4cfdccc09899293ac629d46521d4..165e10ad4906160d7470dbc875f11394a37a27c3 100644 (file)
@@ -490,7 +490,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
        SMB_STRUCT_DIR *dir = NULL;
        SMB_STRUCT_DIRENT *dirent = NULL;
 
        SMB_STRUCT_DIR *dir = NULL;
        SMB_STRUCT_DIRENT *dirent = NULL;
 
-       dir = sys_opendir(modules_path(talloc_tos(), 
+       dir = opendir(modules_path(talloc_tos(), 
                                       SAMBA_SUBSYSTEM_GPEXT));
        if (!dir) {
                return map_nt_error_from_unix_common(errno);
                                       SAMBA_SUBSYSTEM_GPEXT));
        if (!dir) {
                return map_nt_error_from_unix_common(errno);
index 95500b086216354ef8e016af9a297e67cdc3f3e4..0fb3e3ff2fb5875926b6795a38303ec3bdaef950 100644 (file)
@@ -2082,7 +2082,7 @@ static int file_find(struct file_list **list, const char *directory,
        bool isdir;
        const char *dname;
 
        bool isdir;
        const char *dname;
 
-        dir = sys_opendir(directory);
+        dir = opendir(directory);
        if (!dir)
                return -1;
 
        if (!dir)
                return -1;
 
index 654735a483e0d1b703bc276dc0c0a0fc86a0bbdc..bd12e5364e57718bb41a2e57709e297835ddaed1 100644 (file)
@@ -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);
 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);
 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);
index 421beb53fd28dcc1249887c8d03f83ad4cd795bb..9705dda697616fed9cb32e259b9979084fe9d717 100644 (file)
@@ -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
 /*******************************************************************
  An fdopendir wrapper.
  Ugly hack - we need dirfd for this to work correctly in the
index 615c0296b4683344c7e66abb257c2dc16f16ec9c..1c55fe7bbe4778234dbfaafb187fb2ecc2b7b020 100644 (file)
@@ -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);
        SMB_STRUCT_DIR *result;
 
        START_PROFILE(syscall_opendir);
-       result = sys_opendir(fname);
+       result = opendir(fname);
        END_PROFILE(syscall_opendir);
        return result;
 }
        END_PROFILE(syscall_opendir);
        return result;
 }
index 95de44137b4ced2dd055046c5d0afa558bf0e6c0..12d1f66c58b24085833b3b688a838c3f5850f281 100644 (file)
@@ -157,7 +157,7 @@ static void atalk_rrmdir(TALLOC_CTX *ctx, char *path)
 
        if (!path) return;
 
 
        if (!path) return;
 
-       dir = sys_opendir(path);
+       dir = opendir(path);
        if (!dir) return;
 
        while (NULL != (dent = sys_readdir(dir))) {
        if (!dir) return;
 
        while (NULL != (dent = sys_readdir(dir))) {
index d48ee795e844c06905e0887ab765cc97dcb426f6..599b48d89cff82463a3fa26b75df66b68c8611d1 100644 (file)
@@ -8388,7 +8388,7 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
         }
 
        /* Ensure this is pointing to a directory. */
         }
 
        /* 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",
 
        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) ));
        if (!dp) {
                DEBUG(0,("load_usershare_shares:: failed to open directory %s. %s\n",
                        usersharepath, strerror(errno) ));
index b083fb94bf729c111fee798f215ce32602f33141..795471b580caa72ea7fa0a7c15c49d951ecca322 100644 (file)
@@ -101,7 +101,7 @@ static int findpty(char **slave)
                return (-1);
        }
 
                return (-1);
        }
 
-       dirp = sys_opendir("/dev");
+       dirp = opendir("/dev");
        if (!dirp) {
                SAFE_FREE(line);
                return (-1);
        if (!dirp) {
                SAFE_FREE(line);
                return (-1);
index 8f77f739947faa76d2c3e715ad5eda80a74ba236..b9e0cb51522a73116a1ed8ede786eb60fda33e3b 100644 (file)
@@ -217,7 +217,7 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours)
        if (!basepath) {
                return -1;
        }
        if (!basepath) {
                return -1;
        }
-       dp = sys_opendir(basepath);
+       dp = opendir(basepath);
        if (!dp) {
                d_fprintf(stderr,
                        _("get_share_list: cannot open usershare directory %s. "
        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;
        }
 
                return -1;
        }
 
-       dp = sys_opendir(basepath);
+       dp = opendir(basepath);
        if (!dp) {
                d_fprintf(stderr,
                        _("count_num_usershares: cannot open usershare "
        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;
        }
 
                return -1;
        }
 
-       dp = sys_opendir(lp_usershare_path());
+       dp = opendir(lp_usershare_path());
        if (!dp) {
                int err = errno;
                d_fprintf(stderr,
        if (!dp) {
                int err = errno;
                d_fprintf(stderr,