summaryrefslogtreecommitdiff
path: root/source3/utils/dbwrap_tool.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-10-06 21:07:27 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:58 +0200
commit658f72128ff6950c6a03994198b4464a273fb300 (patch)
tree121d3cdd05b0cf84ef0eb2361c4aff21d24f5b46 /source3/utils/dbwrap_tool.c
parent603c3e1bcb7b4106afe4aefdfed43e7832ede956 (diff)
downloadsamba-658f72128ff6950c6a03994198b4464a273fb300.tar.gz
samba-658f72128ff6950c6a03994198b4464a273fb300.tar.bz2
samba-658f72128ff6950c6a03994198b4464a273fb300.zip
s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
for consistency and better error propagation
Diffstat (limited to 'source3/utils/dbwrap_tool.c')
-rw-r--r--source3/utils/dbwrap_tool.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 33ef94f6b9..fd599dd504 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -53,15 +53,15 @@ static int dbwrap_tool_fetch_uint32(struct db_context *db,
void *data)
{
uint32_t value;
- bool ret;
+ NTSTATUS ret;
ret = dbwrap_fetch_uint32(db, keyname, &value);
- if (ret) {
+ if (NT_STATUS_IS_OK(ret)) {
d_printf("%u\n", value);
return 0;
} else {
- d_fprintf(stderr, "ERROR: could not fetch uint32 key '%s'\n",
- keyname);
+ d_fprintf(stderr, "ERROR: could not fetch uint32 key '%s': "
+ "%s\n", nt_errstr(ret), keyname);
return -1;
}
}