Skip to content

Commit

Permalink
build: Remove sys_readdir wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
abartlet committed Apr 5, 2012
1 parent fe526bb commit afdb780
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion libgpo/gpext/gpext.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
return map_nt_error_from_unix_common(errno);
}

while ((dirent = sys_readdir(dir))) {
while ((dirent = readdir(dir))) {

fstring name; /* forgive me... */
char *p;
Expand Down
1 change: 0 additions & 1 deletion source3/include/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ 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_fdopendir(int fd);
SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp);
void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset);
long sys_telldir(SMB_STRUCT_DIR *dirp);
void sys_rewinddir(SMB_STRUCT_DIR *dirp);
Expand Down
9 changes: 0 additions & 9 deletions source3/lib/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,6 @@ SMB_STRUCT_DIR *sys_fdopendir(int fd)
#endif
}

/*******************************************************************
A readdir wrapper.
********************************************************************/

SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp)
{
return readdir(dirp);
}

/*******************************************************************
A seekdir wrapper.
********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion source3/lib/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ const char *readdirname(SMB_STRUCT_DIR *p)
if (!p)
return(NULL);

ptr = (SMB_STRUCT_DIRENT *)sys_readdir(p);
ptr = (SMB_STRUCT_DIRENT *)readdir(p);
if (!ptr)
return(NULL);

Expand Down
2 changes: 1 addition & 1 deletion source3/modules/onefs_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ onefs_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
if (!lp_parm_bool(SNUM(handle->conn), PARM_ONEFS_TYPE,
PARM_USE_READDIRPLUS, PARM_USE_READDIRPLUS_DEFAULT))
{
return sys_readdir(dirp);
return readdir(dirp);
}

/* Retrieve state based off DIR handle */
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 @@ -374,7 +374,7 @@ static SMB_STRUCT_DIRENT *vfswrap_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIRENT *result;

START_PROFILE(syscall_readdir);
result = sys_readdir(dirp);
result = readdir(dirp);
/* Default Posix readdir() does not give us stat info.
* Set to invalid to indicate we didn't return this info. */
if (sbuf)
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 @@ -160,7 +160,7 @@ static void atalk_rrmdir(TALLOC_CTX *ctx, char *path)
dir = opendir(path);
if (!dir) return;

while (NULL != (dent = sys_readdir(dir))) {
while (NULL != (dent = readdir(dir))) {
if (strcmp(dent->d_name, ".") == 0 ||
strcmp(dent->d_name, "..") == 0)
continue;
Expand Down
2 changes: 1 addition & 1 deletion source3/param/loadparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -8806,7 +8806,7 @@ int load_usershare_shares(struct smbd_server_connection *sconn,
}

for (num_dir_entries = 0, num_bad_dir_entries = 0, num_tmp_dir_entries = 0;
(de = sys_readdir(dp));
(de = readdir(dp));
num_dir_entries++ ) {
int r;
const char *n = de->d_name;
Expand Down
4 changes: 2 additions & 2 deletions source3/utils/net_usershare.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours)
return -1;
}

while((de = sys_readdir(dp)) != 0) {
while((de = readdir(dp)) != 0) {
SMB_STRUCT_STAT sbuf;
char *path;
const char *n = de->d_name;
Expand Down Expand Up @@ -565,7 +565,7 @@ static int count_num_usershares(void)
return -1;
}

while((de = sys_readdir(dp)) != 0) {
while((de = readdir(dp)) != 0) {
SMB_STRUCT_STAT sbuf;
char *path;
const char *n = de->d_name;
Expand Down

0 comments on commit afdb780

Please sign in to comment.