Skip to content

Commit

Permalink
build: Remove sys_opendir wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
abartlet committed Apr 5, 2012
1 parent b74fe73 commit fe526bb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion libgpo/gpext/gpext.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
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);
Expand Down
2 changes: 1 addition & 1 deletion source3/client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion source3/include/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 0 additions & 9 deletions source3/lib/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source3/modules/vfs_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion source3/modules/vfs_netatalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down
4 changes: 2 additions & 2 deletions source3/param/loadparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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) ));
Expand Down
2 changes: 1 addition & 1 deletion source3/rpc_server/samr/srv_samr_chgpasswd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions source3/utils/net_usershare.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down Expand Up @@ -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 "
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit fe526bb

Please sign in to comment.