summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-06 22:28:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:55 -0500
commit2151cde58014ea2e822c13d2f8a369b45dc19ca8 (patch)
treeb0cd4c5b394e636232f417bcf482da87d1e18975 /source4/ntvfs/common
parent05e7c481465e3065effaf21b43636d6605d7c313 (diff)
downloadsamba-2151cde58014ea2e822c13d2f8a369b45dc19ca8.tar.gz
samba-2151cde58014ea2e822c13d2f8a369b45dc19ca8.tar.bz2
samba-2151cde58014ea2e822c13d2f8a369b45dc19ca8.zip
r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139510788548a874e9213d91317f83ca9)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r--source4/ntvfs/common/brlock_tdb.c26
-rw-r--r--source4/ntvfs/common/notify.c4
-rw-r--r--source4/ntvfs/common/opendb.c6
-rw-r--r--source4/ntvfs/common/opendb_tdb.c16
4 files changed, 26 insertions, 26 deletions
diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c
index 0bca9d2590..2b81521a2c 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -126,7 +126,7 @@ static struct brl_handle *brl_tdb_create_handle(TALLOC_CTX *mem_ctx, struct ntvf
/*
see if two locking contexts are equal
*/
-static BOOL brl_tdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2)
+static bool brl_tdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2)
{
return (cluster_id_equal(&ctx1->server, &ctx2->server) &&
ctx1->smbpid == ctx2->smbpid &&
@@ -139,7 +139,7 @@ static BOOL brl_tdb_same_context(struct lock_context *ctx1, struct lock_context
lck1 is the existing lock. lck2 is the new lock we are
looking at adding
*/
-static BOOL brl_tdb_overlap(struct lock_struct *lck1,
+static bool brl_tdb_overlap(struct lock_struct *lck1,
struct lock_struct *lck2)
{
/* this extra check is not redundent - it copes with locks
@@ -147,12 +147,12 @@ static BOOL brl_tdb_overlap(struct lock_struct *lck1,
if (lck1->size != 0 &&
lck1->start == lck2->start &&
lck1->size == lck2->size) {
- return True;
+ return true;
}
if (lck1->start >= (lck2->start+lck2->size) ||
lck2->start >= (lck1->start+lck1->size)) {
- return False;
+ return false;
}
/* we have a conflict. Now check to see if lck1 really still
@@ -163,28 +163,28 @@ static BOOL brl_tdb_overlap(struct lock_struct *lck1,
* hasn't been written yet. When clustered this will need to
* call into ctdb */
- return True;
+ return true;
}
/*
See if lock2 can be added when lock1 is in place.
*/
-static BOOL brl_tdb_conflict(struct lock_struct *lck1,
+static bool brl_tdb_conflict(struct lock_struct *lck1,
struct lock_struct *lck2)
{
/* pending locks don't conflict with anything */
if (lck1->lock_type >= PENDING_READ_LOCK ||
lck2->lock_type >= PENDING_READ_LOCK) {
- return False;
+ return false;
}
if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK) {
- return False;
+ return false;
}
if (brl_tdb_same_context(&lck1->context, &lck2->context) &&
lck2->lock_type == READ_LOCK && lck1->ntvfs == lck2->ntvfs) {
- return False;
+ return false;
}
return brl_tdb_overlap(lck1, lck2);
@@ -195,16 +195,16 @@ static BOOL brl_tdb_conflict(struct lock_struct *lck1,
Check to see if this lock conflicts, but ignore our own locks on the
same fnum only.
*/
-static BOOL brl_tdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2)
+static bool brl_tdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2)
{
/* pending locks don't conflict with anything */
if (lck1->lock_type >= PENDING_READ_LOCK ||
lck2->lock_type >= PENDING_READ_LOCK) {
- return False;
+ return false;
}
if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK)
- return False;
+ return false;
/*
* note that incoming write calls conflict with existing READ
@@ -214,7 +214,7 @@ static BOOL brl_tdb_conflict_other(struct lock_struct *lck1, struct lock_struct
if (brl_tdb_same_context(&lck1->context, &lck2->context) &&
lck1->ntvfs == lck2->ntvfs &&
(lck2->lock_type == READ_LOCK || lck1->lock_type == WRITE_LOCK)) {
- return False;
+ return false;
}
return brl_tdb_overlap(lck1, lck2);
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 0d36a20a60..0214c39b2d 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -58,7 +58,7 @@ struct notify_list {
#define NOTIFY_KEY "notify array"
#define NOTIFY_ENABLE "notify:enable"
-#define NOTIFY_ENABLE_DEFAULT True
+#define NOTIFY_ENABLE_DEFAULT true
static NTSTATUS notify_remove_all(struct notify_context *notify);
static void notify_handler(struct messaging_context *msg_ctx, void *private_data,
@@ -86,7 +86,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
{
struct notify_context *notify;
- if (share_bool_option(scfg, NOTIFY_ENABLE, NOTIFY_ENABLE_DEFAULT) != True) {
+ if (share_bool_option(scfg, NOTIFY_ENABLE, NOTIFY_ENABLE_DEFAULT) != true) {
return NULL;
}
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index 112de1d7d4..59990d2fc1 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -91,7 +91,7 @@ _PUBLIC_ struct odb_lock *odb_lock(TALLOC_CTX *mem_ctx,
*/
_PUBLIC_ NTSTATUS odb_open_file(struct odb_lock *lck, void *file_handle,
uint32_t stream_id, uint32_t share_access,
- uint32_t access_mask, BOOL delete_on_close,
+ uint32_t access_mask, bool delete_on_close,
const char *path,
uint32_t oplock_level, uint32_t *oplock_granted)
{
@@ -139,7 +139,7 @@ _PUBLIC_ NTSTATUS odb_rename(struct odb_lock *lck, const char *path)
/*
update delete on close flag on an open file
*/
-_PUBLIC_ NTSTATUS odb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_close)
+_PUBLIC_ NTSTATUS odb_set_delete_on_close(struct odb_lock *lck, bool del_on_close)
{
return ops->odb_set_delete_on_close(lck, del_on_close);
}
@@ -149,7 +149,7 @@ _PUBLIC_ NTSTATUS odb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_clos
people still have the file open
*/
_PUBLIC_ NTSTATUS odb_get_delete_on_close(struct odb_context *odb,
- DATA_BLOB *key, BOOL *del_on_close,
+ DATA_BLOB *key, bool *del_on_close,
int *open_count, char **path)
{
return ops->odb_get_delete_on_close(odb, key, del_on_close, open_count, path);
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index 60ab11b96a..a037e7e47e 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -52,7 +52,7 @@
struct odb_context {
struct tdb_wrap *w;
struct ntvfs_context *ntvfs_ctx;
- BOOL oplocks;
+ bool oplocks;
};
/*
@@ -266,7 +266,7 @@ static NTSTATUS odb_oplock_break_send(struct odb_context *odb, struct opendb_ent
*/
static NTSTATUS odb_tdb_open_file(struct odb_lock *lck, void *file_handle,
uint32_t stream_id, uint32_t share_access,
- uint32_t access_mask, BOOL delete_on_close,
+ uint32_t access_mask, bool delete_on_close,
const char *path,
uint32_t oplock_level, uint32_t *oplock_granted)
{
@@ -276,7 +276,7 @@ static NTSTATUS odb_tdb_open_file(struct odb_lock *lck, void *file_handle,
struct opendb_file file;
NTSTATUS status;
- if (odb->oplocks == False) {
+ if (odb->oplocks == false) {
oplock_level = OPLOCK_NONE;
}
@@ -407,7 +407,7 @@ static NTSTATUS odb_tdb_close_file(struct odb_lock *lck, void *file_handle)
if (file_handle == file.entries[i].file_handle &&
cluster_id_equal(&odb->ntvfs_ctx->server_id, &file.entries[i].server)) {
if (file.entries[i].delete_on_close) {
- file.delete_on_close = True;
+ file.delete_on_close = true;
}
if (i < file.num_entries-1) {
memmove(file.entries+i, file.entries+i+1,
@@ -494,7 +494,7 @@ static NTSTATUS odb_tdb_rename(struct odb_lock *lck, const char *path)
/*
update delete on close flag on an open file
*/
-static NTSTATUS odb_tdb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_close)
+static NTSTATUS odb_tdb_set_delete_on_close(struct odb_lock *lck, bool del_on_close)
{
NTSTATUS status;
struct opendb_file file;
@@ -512,7 +512,7 @@ static NTSTATUS odb_tdb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_cl
people still have the file open
*/
static NTSTATUS odb_tdb_get_delete_on_close(struct odb_context *odb,
- DATA_BLOB *key, BOOL *del_on_close,
+ DATA_BLOB *key, bool *del_on_close,
int *open_count, char **path)
{
NTSTATUS status;
@@ -525,7 +525,7 @@ static NTSTATUS odb_tdb_get_delete_on_close(struct odb_context *odb,
status = odb_pull_record(lck, &file);
if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) {
talloc_free(lck);
- (*del_on_close) = False;
+ (*del_on_close) = false;
return NT_STATUS_OK;
}
if (!NT_STATUS_IS_OK(status)) {
@@ -541,7 +541,7 @@ static NTSTATUS odb_tdb_get_delete_on_close(struct odb_context *odb,
*path = talloc_strdup(odb, file.path);
NT_STATUS_HAVE_NO_MEMORY(*path);
if (file.num_entries == 1 && file.entries[0].delete_on_close) {
- (*del_on_close) = True;
+ (*del_on_close) = true;
}
}