diff options
author | Lars Müller <lmuelle@samba.org> | 2006-01-17 21:22:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:06:09 -0500 |
commit | c42be9fd38556a1cc2e16c8d763a592beb863806 (patch) | |
tree | e69234055238ca6996dac2c153ad0c3e44f1e134 /source3/utils/net_status.c | |
parent | f7519540090b2f47259f72d81b267b3e7a1a8950 (diff) | |
download | samba-c42be9fd38556a1cc2e16c8d763a592beb863806.tar.gz samba-c42be9fd38556a1cc2e16c8d763a592beb863806.tar.bz2 samba-c42be9fd38556a1cc2e16c8d763a592beb863806.zip |
r12986: Use d_fprintf(stderr, ...) for any error message in net.
All 'usage' messages are still printed to stdout.
Fix some compiler warnings for system() calls where we didn't used the
return code. Add appropriate error messages and return with the error
code we got from system() or NT_STATUS_UNSUCCESSFUL.
(This used to be commit f650e3bdafc4c6bcd7eb4bcf8b6b885b979919eb)
Diffstat (limited to 'source3/utils/net_status.c')
-rw-r--r-- | source3/utils/net_status.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c index 31693affe7..d3b1bae276 100644 --- a/source3/utils/net_status.c +++ b/source3/utils/net_status.c @@ -74,7 +74,7 @@ static int net_status_sessions(int argc, const char **argv) TDB_DEFAULT, O_RDONLY, 0); if (tdb == NULL) { - d_printf("%s not initialised\n", lock_path("sessionid.tdb")); + d_fprintf(stderr, "%s not initialised\n", lock_path("sessionid.tdb")); return -1; } @@ -186,7 +186,7 @@ static int net_status_shares_parseable(int argc, const char **argv) TDB_DEFAULT, O_RDONLY, 0); if (tdb == NULL) { - d_printf("%s not initialised\n", lock_path("sessionid.tdb")); + d_fprintf(stderr, "%s not initialised\n", lock_path("sessionid.tdb")); return -1; } @@ -197,9 +197,9 @@ static int net_status_shares_parseable(int argc, const char **argv) TDB_DEFAULT, O_RDONLY, 0); if (tdb == NULL) { - d_printf("%s not initialised\n", lock_path("connections.tdb")); - d_printf("This is normal if no SMB client has ever connected " - "to your server.\n"); + d_fprintf(stderr, "%s not initialised\n", lock_path("connections.tdb")); + d_fprintf(stderr, "This is normal if no SMB client has ever " + "connected to your server.\n"); return -1; } @@ -226,10 +226,10 @@ static int net_status_shares(int argc, const char **argv) TDB_DEFAULT, O_RDONLY, 0); if (tdb == NULL) { - d_printf("%s not initialised\n", + d_fprintf(stderr, "%s not initialised\n", lock_path("connections.tdb")); - d_printf("This is normal if no SMB client has ever " - "connected to your server.\n"); + d_fprintf(stderr, "This is normal if no SMB client has " + "ever connected to your server.\n"); return -1; } |