summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorMatt Kraai <mkraai@beckman.com>2010-01-05 09:42:54 -0800
committerStefan Metzmacher <metze@samba.org>2010-02-02 07:18:18 +0100
commitd8071e7ed7c57e8b0f2d80420e27f9ea7ab63022 (patch)
tree9ee0823d8f3e43217989f15c442ab747e84d22c2 /source4/torture/raw
parenta47b6ebb3036f5073fdb2320b584345d3604c38d (diff)
downloadsamba-d8071e7ed7c57e8b0f2d80420e27f9ea7ab63022.tar.gz
samba-d8071e7ed7c57e8b0f2d80420e27f9ea7ab63022.tar.bz2
samba-d8071e7ed7c57e8b0f2d80420e27f9ea7ab63022.zip
Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/qfileinfo.c40
-rw-r--r--source4/torture/raw/qfsinfo.c12
-rw-r--r--source4/torture/raw/read.c12
-rw-r--r--source4/torture/raw/samba3misc.c8
-rw-r--r--source4/torture/raw/setfileinfo.c6
-rw-r--r--source4/torture/raw/write.c12
6 files changed, 45 insertions, 45 deletions
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 032df87a4d..86cae383ff 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -29,10 +29,10 @@
static struct {
const char *name;
enum smb_fileinfo_level level;
- uint_t only_paths:1;
- uint_t only_handles:1;
+ unsigned int only_paths:1;
+ unsigned int only_handles:1;
uint32_t capability_mask;
- uint_t expected_ipc_access_denied:1;
+ unsigned int expected_ipc_access_denied:1;
NTSTATUS expected_ipc_fnum_status;
NTSTATUS fnum_status, fname_status;
union smb_fileinfo fnum_finfo, fname_finfo;
@@ -182,8 +182,8 @@ static union smb_fileinfo *fname_find(bool is_ipc, const char *name)
/* local macros to make the code below more readable */
#define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
- #n1, #v1, (uint_t)s1->n1.out.v1, \
- #n2, #v2, (uint_t)s2->n2.out.v2, \
+ #n1, #v1, (unsigned int)s1->n1.out.v1, \
+ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
@@ -211,8 +211,8 @@ static union smb_fileinfo *fname_find(bool is_ipc, const char *name)
#define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \
printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \
#n1, #v1, \
- (uint_t)s1->n1.out.v1, \
- (uint_t)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
@@ -529,21 +529,21 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find(sname); \
if (s1 && s1->stype.out.tfield != correct_size) { \
printf("(%d) handle %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_size); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_size); \
ret = false; \
} \
s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != correct_size) { \
printf("(%d) path %s/%s incorrect - %u should be %u\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_size); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_size); \
ret = false; \
}} while (0)
s1 = fnum_find("STANDARD_INFO");
correct_size = s1->standard_info.out.size;
- torture_comment(torture, "size: %u\n", (uint_t)correct_size);
+ torture_comment(torture, "size: %u\n", (unsigned int)correct_size);
SIZE_CHECK("GETATTR", getattr, size);
SIZE_CHECK("GETATTRE", getattre, size);
@@ -564,7 +564,7 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find("STANDARD_INFO");
correct_size = s1->standard_info.out.alloc_size;
- torture_comment(torture, "alloc_size: %u\n", (uint_t)correct_size);
+ torture_comment(torture, "alloc_size: %u\n", (unsigned int)correct_size);
SIZE_CHECK("GETATTRE", getattre, alloc_size);
SIZE_CHECK("STANDARD", standard, alloc_size);
@@ -583,21 +583,21 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
s1 = fnum_find(sname); \
if (s1 && s1->stype.out.tfield != correct_attrib) { \
printf("(%d) handle %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_attrib); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_attrib); \
ret = false; \
} \
s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != correct_attrib) { \
printf("(%d) path %s/%s incorrect - 0x%x should be 0x%x\n", __LINE__, #stype, #tfield, \
- (uint_t)s1->stype.out.tfield, \
- (uint_t)correct_attrib); \
+ (unsigned int)s1->stype.out.tfield, \
+ (unsigned int)correct_attrib); \
ret = false; \
}} while (0)
s1 = fnum_find("BASIC_INFO");
correct_attrib = s1->basic_info.out.attrib;
- torture_comment(torture, "attrib: 0x%x\n", (uint_t)correct_attrib);
+ torture_comment(torture, "attrib: 0x%x\n", (unsigned int)correct_attrib);
ATTRIB_CHECK("GETATTR", getattr, attrib);
if (!is_ipc) {
@@ -825,13 +825,13 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture,
if (s1 && s1->stype.out.tfield != 0) { \
printf("(%d) handle %s/%s unknown != 0 (0x%x)\n", __LINE__, \
#stype, #tfield, \
- (uint_t)s1->stype.out.tfield); \
+ (unsigned int)s1->stype.out.tfield); \
} \
s1 = fname_find(is_ipc, sname); \
if (s1 && s1->stype.out.tfield != 0) { \
printf("(%d) path %s/%s unknown != 0 (0x%x)\n", __LINE__, \
#stype, #tfield, \
- (uint_t)s1->stype.out.tfield); \
+ (unsigned int)s1->stype.out.tfield); \
}} while (0)
#endif
/* now get a bit fancier .... */
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index e4492a5312..111eac14d5 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -69,16 +69,16 @@ static union smb_fsinfo *find(const char *name)
/* local macros to make the code below more readable */
#define VAL_EQUAL(n1, v1, n2, v2) do {if (s1->n1.out.v1 != s2->n2.out.v2) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
- #n1, #v1, (uint_t)s1->n1.out.v1, \
- #n2, #v2, (uint_t)s2->n2.out.v2, \
+ #n1, #v1, (unsigned int)s1->n1.out.v1, \
+ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
#define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (abs((int)(s1->n1.out.v1) - (int)(s2->n2.out.v2)) > 0.1*s1->n1.out.v1) { \
printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
- #n1, #v1, (uint_t)s1->n1.out.v1, \
- #n2, #v2, (uint_t)s2->n2.out.v2, \
+ #n1, #v1, (unsigned int)s1->n1.out.v1, \
+ #n2, #v2, (unsigned int)s2->n2.out.v2, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
@@ -105,8 +105,8 @@ static union smb_fsinfo *find(const char *name)
#define VAL_UNKNOWN(n1, v1) do {if (s1->n1.out.v1 != 0) { \
printf("%s/%s non-zero unknown - %u (0x%x) at %s(%d)\n", \
#n1, #v1, \
- (uint_t)s1->n1.out.v1, \
- (uint_t)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
+ (unsigned int)s1->n1.out.v1, \
__FILE__, __LINE__); \
ret = false; \
}} while(0)
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index efdd040451..430f09be54 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -52,7 +52,7 @@
/*
setup a random buffer based on a seed
*/
-static void setup_buffer(uint8_t *buf, uint_t seed, int len)
+static void setup_buffer(uint8_t *buf, unsigned int seed, int len)
{
int i;
srandom(seed);
@@ -62,7 +62,7 @@ static void setup_buffer(uint8_t *buf, uint_t seed, int len)
/*
check a random buffer based on a seed
*/
-static bool check_buffer(uint8_t *buf, uint_t seed, int len, int line)
+static bool check_buffer(uint8_t *buf, unsigned int seed, int len, int line)
{
int i;
srandom(seed);
@@ -90,7 +90,7 @@ static bool test_read(struct torture_context *tctx, struct smbcli_state *cli)
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -222,7 +222,7 @@ static bool test_lockread(struct torture_context *tctx,
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
if (!cli->transport->negotiate.lockread_supported) {
printf("Server does not support lockread - skipping\n");
@@ -372,7 +372,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -655,7 +655,7 @@ static bool test_readbraw(struct torture_context *tctx,
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
const char *test_data = "TEST DATA";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
if (!cli->transport->negotiate.readbraw_supported) {
printf("Server does not support readbraw - skipping\n");
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 2e85a34761..ca2254b634 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -162,8 +162,8 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
static NTSTATUS raw_smbcli_open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum)
{
union smb_open open_parms;
- uint_t openfn=0;
- uint_t accessmode=0;
+ unsigned int openfn=0;
+ unsigned int accessmode=0;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
@@ -225,8 +225,8 @@ static NTSTATUS raw_smbcli_open(struct smbcli_tree *tree, const char *fname, int
static NTSTATUS raw_smbcli_t2open(struct smbcli_tree *tree, const char *fname, int flags, int share_mode, int *fnum)
{
union smb_open io;
- uint_t openfn=0;
- uint_t accessmode=0;
+ unsigned int openfn=0;
+ unsigned int accessmode=0;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 1f8adfbe9a..8b540b2b61 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -144,7 +144,7 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && finfo2.stype.out.field != value) { \
printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \
- (uint_t)value, (uint_t)finfo2.stype.out.field); \
+ (unsigned int)value, (unsigned int)finfo2.stype.out.field); \
dump_all_info(torture, &finfo1); \
ret = false; \
}} while (0)
@@ -154,8 +154,8 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state
if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2) && nt_time_to_unix(finfo2.stype.out.field) != value) { \
printf("(%s) %s - %s/%s should be 0x%x - 0x%x\n", __location__, \
call_name, #stype, #field, \
- (uint_t)value, \
- (uint_t)nt_time_to_unix(finfo2.stype.out.field)); \
+ (unsigned int)value, \
+ (unsigned int)nt_time_to_unix(finfo2.stype.out.field)); \
printf("\t%s", timestring(torture, value)); \
printf("\t%s\n", nt_time_string(torture, finfo2.stype.out.field)); \
dump_all_info(torture, &finfo1); \
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index ff82dc19d8..a1fde16611 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -66,7 +66,7 @@
/*
setup a random buffer based on a seed
*/
-static void setup_buffer(uint8_t *buf, uint_t seed, int len)
+static void setup_buffer(uint8_t *buf, unsigned int seed, int len)
{
int i;
srandom(seed);
@@ -76,7 +76,7 @@ static void setup_buffer(uint8_t *buf, uint_t seed, int len)
/*
check a random buffer based on a seed
*/
-static bool check_buffer(uint8_t *buf, uint_t seed, int len, const char *location)
+static bool check_buffer(uint8_t *buf, unsigned int seed, int len, const char *location)
{
int i;
srandom(seed);
@@ -104,7 +104,7 @@ static bool test_write(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -232,7 +232,7 @@ static bool test_writex(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
int max_bits=63;
@@ -420,7 +420,7 @@ static bool test_writeunlock(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize);
@@ -568,7 +568,7 @@ static bool test_writeclose(struct torture_context *tctx,
uint8_t *buf;
const int maxsize = 90000;
const char *fname = BASEDIR "\\test.txt";
- uint_t seed = time(NULL);
+ unsigned int seed = time(NULL);
union smb_fileinfo finfo;
buf = talloc_zero_array(tctx, uint8_t, maxsize);