Nobody used that anymore, most callers had passed in NULL anyway.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
sc_data->num_volumes = 0;
sc_data->labels = NULL;
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
if (ISDOT(dname) || ISDOTDOT(dname)) {
TALLOC_FREE(talloced);
continue;
goto err_out;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
struct smb_filename *smb_fname = NULL;
struct smb_filename *atname = NULL;
time_t snap_secs = 0;
nbands = 0;
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
if (ISDOT(dname) || ISDOTDOT(dname)) {
continue;
}
return UINT64_MAX;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
ok = fruit_tmsize_do_dirent(handle, &state, dname);
if (!ok) {
TALLOC_FREE(talloced);
SHADOW_COPY_LABEL *tlabels;
int ret;
- dname = ReadDirName(dir_hnd, NULL, &talloced);
+ dname = ReadDirName(dir_hnd, &talloced);
if (dname == NULL) {
break;
}
return status;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
if (ISDOT(dname) || ISDOTDOT(dname)) {
TALLOC_FREE(talloced);
continue;
dirfsp = dir_hnd_fetch_fsp(dir_hnd);
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))) {
+ while ((dname = ReadDirName(dir_hnd, &talloced))) {
struct smb_filename *atname = NULL;
struct smb_filename *smb_dname_full = NULL;
char *fullname = NULL;
if (do_break) {
break;
}
- }
+ }
TALLOC_FREE(dir_hnd);
return status;
}
dirfsp = dir_hnd_fetch_fsp(dir_hnd);
- while ((dname = ReadDirName(
- dir_hnd, NULL, &talloced)) != NULL) {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
struct smb_filename *smb_dname_full = NULL;
struct smb_filename *direntry_fname = NULL;
char *fullname = NULL;
/* Do a recursive delete. */
RewindDir(dir_hnd);
- while ((dname = ReadDirName(
- dir_hnd, NULL, &talloced)) != NULL) {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
struct smb_filename *direntry_fname = NULL;
struct smb_filename *smb_dname_full = NULL;
char *fullname = NULL;
if (dptr->has_wild) {
const char *name_temp = NULL;
char *talloced = NULL;
- name_temp = ReadDirName(dir_hnd, &st, &talloced);
+ name_temp = ReadDirName(dir_hnd, &talloced);
if (name_temp == NULL) {
return NULL;
}
Don't check for veto or invisible files.
********************************************************************/
-const char *ReadDirName(struct smb_Dir *dir_hnd,
- SMB_STRUCT_STAT *sbuf, char **ptalloced)
+const char *ReadDirName(struct smb_Dir *dir_hnd, char **ptalloced)
{
+ struct stat_ex st = {
+ .st_ex_nlink = 0,
+ };
const char *n;
char *talloced = NULL;
connection_struct *conn = dir_hnd->conn;
return n;
}
- while ((n = vfs_readdirname(conn, dir_hnd->fsp, dir_hnd->dir, sbuf, &talloced))) {
+ while ((n = vfs_readdirname(conn,
+ dir_hnd->fsp,
+ dir_hnd->dir,
+ &st,
+ &talloced))) {
/* Ignore . and .. - we've already returned them. */
if (ISDOT(n) || ISDOTDOT(n)) {
TALLOC_FREE(talloced);
return status;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))) {
+ while ((dname = ReadDirName(dir_hnd, &talloced))) {
struct smb_filename *smb_dname_full = NULL;
struct smb_filename *direntry_fname = NULL;
char *fullname = NULL;
}
/* now scan for matching names */
- while ((dname = ReadDirName(cur_dir, NULL, &talloced))) {
+ while ((dname = ReadDirName(cur_dir, &talloced))) {
/* Is it dot or dot dot. */
if (ISDOT(dname) || ISDOTDOT(dname)) {
goto out;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
struct smb_filename *smb_dname =
synthetic_smb_fname(frame,
dname,
goto out;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
struct smb_filename *smb_dname = NULL;
if (cnt >= jn_remain) {
const char *mask,
uint32_t attr,
struct smb_Dir **_dir_hnd);
-const char *ReadDirName(struct smb_Dir *dir_hnd,
- SMB_STRUCT_STAT *sbuf, char **talloced);
+const char *ReadDirName(struct smb_Dir *dir_hnd, char **talloced);
void RewindDir(struct smb_Dir *dir_hnd);
NTSTATUS can_delete_directory(struct connection_struct *conn,
const char *dirname);
return NT_STATUS_UNSUCCESSFUL;
}
- dname = ReadDirName(vfs->currentdir,
- NULL,
- &talloced);
+ dname = ReadDirName(vfs->currentdir, &talloced);
if (dname == NULL) {
printf("readdir: NULL\n");
return NT_STATUS_OK;
while (true) {
/* ReadDirName() returns Windows "encoding" */
- dname = ReadDirName(vfs->currentdir,
- NULL,
- &dname_talloced);
+ dname = ReadDirName(vfs->currentdir, &dname_talloced);
if (dname == NULL) {
break;
}