diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-04-29 11:57:02 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-04-29 16:38:13 +1000 |
commit | 0eca33bbf620678759bbe39efaa74f33f96efb74 (patch) | |
tree | 69f8d8cff78cdcd8ee93280d9b88563bc7331cf3 /source3/torture | |
parent | 08c90d6f2df85499f43c5766a62839e80437290f (diff) | |
download | samba-0eca33bbf620678759bbe39efaa74f33f96efb74.tar.gz samba-0eca33bbf620678759bbe39efaa74f33f96efb74.tar.bz2 samba-0eca33bbf620678759bbe39efaa74f33f96efb74.zip |
s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
This means we use just one constant for this file attribute.
Andrew Bartlett
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/masktest.c | 6 | ||||
-rw-r--r-- | source3/torture/nbio.c | 6 | ||||
-rw-r--r-- | source3/torture/torture.c | 18 |
3 files changed, 15 insertions, 15 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c index a523560fd9..818fef1330 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -313,11 +313,11 @@ static void get_real_name(struct cli_state *cli, *pp_long_name = NULL; /* nasty hack to force level 260 listings - tridge */ if (max_protocol <= PROTOCOL_LANMAN1) { - cli_list_trans(cli, "\\masktest\\*.*", FILE_ATTRIBUTE_HIDDEN | aDIR, + cli_list_trans(cli, "\\masktest\\*.*", FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY, SMB_FIND_FILE_BOTH_DIRECTORY_INFO, listfn, &state); } else { - cli_list_trans(cli, "\\masktest\\*", FILE_ATTRIBUTE_HIDDEN | aDIR, + cli_list_trans(cli, "\\masktest\\*", FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY, SMB_FIND_FILE_BOTH_DIRECTORY_INFO, listfn, &state); } @@ -359,7 +359,7 @@ static void testpair(struct cli_state *cli, const char *mask, const char *file) return; } fstrcpy(res1, "---"); - cli_list(cli, mask, FILE_ATTRIBUTE_HIDDEN | aDIR, listfn, NULL); + cli_list(cli, mask, FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY, listfn, NULL); res2 = reg_test(cli, mask, long_name, short_name); diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c index 96584455e4..085d206a75 100644 --- a/source3/torture/nbio.c +++ b/source3/torture/nbio.c @@ -305,13 +305,13 @@ static NTSTATUS delete_fn(const char *mnt, struct file_info *finfo, printf("asprintf failed\n"); return NT_STATUS_NO_MEMORY; } - if (finfo->mode & aDIR) { + if (finfo->mode & FILE_ATTRIBUTE_DIRECTORY) { char *s2; if (asprintf(&s2, "%s\\*", s) == -1) { printf("asprintf failed\n"); return NT_STATUS_NO_MEMORY; } - status = cli_list(c, s2, aDIR, delete_fn, NULL); + status = cli_list(c, s2, FILE_ATTRIBUTE_DIRECTORY, delete_fn, NULL); if (!NT_STATUS_IS_OK(status)) { free(n); free(s2); @@ -336,7 +336,7 @@ void nb_deltree(const char *dname) } total_deleted = 0; - cli_list(c, mask, aDIR, delete_fn, NULL); + cli_list(c, mask, FILE_ATTRIBUTE_DIRECTORY, delete_fn, NULL); free(mask); cli_rmdir(c, dname); 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; |