From 0eca33bbf620678759bbe39efaa74f33f96efb74 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Apr 2011 11:57:02 +1000 Subject: s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR This means we use just one constant for this file attribute. Andrew Bartlett --- source3/torture/torture.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source3/torture/torture.c') diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 4238627a0f..090f838105 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -5385,7 +5385,7 @@ static NTSTATUS del_fn(const char *mnt, struct file_info *finfo, const char *mas if (strcmp(finfo->name, ".") == 0 || strcmp(finfo->name, "..") == 0) return NT_STATUS_OK; - if (finfo->mode & aDIR) { + if (finfo->mode & FILE_ATTRIBUTE_DIRECTORY) { if (!NT_STATUS_IS_OK(cli_rmdir(pcli, fname))) printf("del_fn: failed to rmdir %s\n,", fname ); } else { @@ -5678,7 +5678,7 @@ static bool run_dirtest1(int dummy) cli_sockopt(cli, sockops); cli_list(cli, "\\LISTDIR\\*", 0, del_fn, cli); - cli_list(cli, "\\LISTDIR\\*", aDIR, del_fn, cli); + cli_list(cli, "\\LISTDIR\\*", FILE_ATTRIBUTE_DIRECTORY, del_fn, cli); cli_rmdir(cli, "\\LISTDIR"); cli_mkdir(cli, "\\LISTDIR"); @@ -5704,7 +5704,7 @@ static bool run_dirtest1(int dummy) /* Now ensure that doing an old list sees both files and directories. */ num_seen = 0; - cli_list_old(cli, "\\LISTDIR\\*", aDIR, list_fn, &num_seen); + cli_list_old(cli, "\\LISTDIR\\*", FILE_ATTRIBUTE_DIRECTORY, list_fn, &num_seen); printf("num_seen = %d\n", num_seen ); /* We should see 100 files + 1000 directories + . and .. */ if (num_seen != 2002) @@ -5714,20 +5714,20 @@ static bool run_dirtest1(int dummy) * relevent entries. */ num_seen = 0; - cli_list_old(cli, "\\LISTDIR\\*", (aDIR<<8)|aDIR, list_fn, &num_seen); + cli_list_old(cli, "\\LISTDIR\\*", (FILE_ATTRIBUTE_DIRECTORY<<8)|FILE_ATTRIBUTE_DIRECTORY, list_fn, &num_seen); printf("num_seen = %d\n", num_seen ); if (num_seen != 1002) correct = False; num_seen = 0; - cli_list_old(cli, "\\LISTDIR\\*", (aARCH<<8)|aDIR, list_fn, &num_seen); + cli_list_old(cli, "\\LISTDIR\\*", (aARCH<<8)|FILE_ATTRIBUTE_DIRECTORY, list_fn, &num_seen); printf("num_seen = %d\n", num_seen ); if (num_seen != 1000) correct = False; /* Delete everything. */ cli_list(cli, "\\LISTDIR\\*", 0, del_fn, cli); - cli_list(cli, "\\LISTDIR\\*", aDIR, del_fn, cli); + cli_list(cli, "\\LISTDIR\\*", FILE_ATTRIBUTE_DIRECTORY, del_fn, cli); cli_rmdir(cli, "\\LISTDIR"); #if 0 @@ -6714,7 +6714,7 @@ static NTSTATUS shortname_del_fn(const char *mnt, struct file_info *finfo, if (strcmp(finfo->name, ".") == 0 || strcmp(finfo->name, "..") == 0) return NT_STATUS_OK; - if (finfo->mode & aDIR) { + if (finfo->mode & FILE_ATTRIBUTE_DIRECTORY) { status = cli_rmdir(pcli, fname); if (!NT_STATUS_IS_OK(status)) { printf("del_fn: failed to rmdir %s\n,", fname ); @@ -6779,7 +6779,7 @@ static bool run_shortname_test(int dummy) cli_sockopt(cli, sockops); cli_list(cli, "\\shortname\\*", 0, shortname_del_fn, cli); - cli_list(cli, "\\shortname\\*", aDIR, shortname_del_fn, cli); + cli_list(cli, "\\shortname\\*", FILE_ATTRIBUTE_DIRECTORY, shortname_del_fn, cli); cli_rmdir(cli, "\\shortname"); if (!NT_STATUS_IS_OK(cli_mkdir(cli, "\\shortname"))) { @@ -6840,7 +6840,7 @@ static bool run_shortname_test(int dummy) out: cli_list(cli, "\\shortname\\*", 0, shortname_del_fn, cli); - cli_list(cli, "\\shortname\\*", aDIR, shortname_del_fn, cli); + cli_list(cli, "\\shortname\\*", FILE_ATTRIBUTE_DIRECTORY, shortname_del_fn, cli); cli_rmdir(cli, "\\shortname"); torture_close_connection(cli); return correct; -- cgit