[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Sun May 17 21:25:08 MDT 2015
The branch, master has been updated
via 175ae96 Remove [u]int[XX] defines from source3/include/includes.h
via d87fd39 Use tevent_req_poll_ntstatus
from 12df833 Convert the few instances of int32 there were to int32_t.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 175ae9668c8728579f24bac4f8b403262d212649
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sun May 17 17:21:06 2015 -0700
Remove [u]int[XX] defines from source3/include/includes.h
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Mon May 18 05:24:22 CEST 2015 on sn-devel-104
commit d87fd395012b8e94f6456e046e0c05474ca750da
Author: Volker Lendecke <vl at samba.org>
Date: Tue Apr 28 14:00:06 2015 +0000
Use tevent_req_poll_ntstatus
Kill 41 lines ..
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/include/includes.h | 59 ----------------------
source3/libsmb/clientgen.c | 3 +-
source3/libsmb/clifile.c | 93 ++++++++++++-----------------------
source3/libsmb/clifsinfo.c | 3 +-
source3/libsmb/clilist.c | 6 +--
source3/libsmb/climessage.c | 3 +-
source3/libsmb/clireadwrite.c | 9 ++--
source3/rpc_client/cli_pipe.c | 3 +-
source3/rpc_client/rpc_transport_np.c | 3 +-
9 files changed, 41 insertions(+), 141 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/includes.h b/source3/include/includes.h
index b61742a..81bba40 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -177,65 +177,6 @@ typedef sig_atomic_t volatile SIG_ATOMIC_T;
#endif
/*
- Samba needs type definitions for int16, int32, uint16 and uint32.
-
- Normally these are signed and unsigned 16 and 32 bit integers, but
- they actually only need to be at least 16 and 32 bits
- respectively. Thus if your word size is 8 bytes just defining them
- as signed and unsigned int will work.
-*/
-
-#ifndef uint8
-#define uint8 uint8_t
-#endif
-
-#if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H)
-# define int16 int16_t
- /* needed to work around compile issue on HP-UX 11.x */
-# define _INT16 1
-#endif
-
-/*
- * Note we duplicate the size tests in the unsigned
- * case as int16 may be a typedef from rpc/rpc.h
- */
-
-
-#if !defined(uint16) && !defined(HAVE_UINT16_FROM_RPC_RPC_H)
-# define uint16 uint16_t
-#endif
-
-#if !defined(int32) && !defined(HAVE_INT32_FROM_RPC_RPC_H)
-# define int32 int32_t
-# ifndef _INT32
- /* needed to work around compile issue on HP-UX 11.x */
-# define _INT32 1
-# endif
-#endif
-
-/*
- * Note we duplicate the size tests in the unsigned
- * case as int32 may be a typedef from rpc/rpc.h
- */
-
-#if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H)
-# define uint32 uint32_t
-#endif
-
-/*
- * check for 8 byte long long
- */
-
-#if !defined(uint64)
-# define uint64 uint64_t
-#endif
-
-#if !defined(int64)
-# define int64 int64_t
-#endif
-
-
-/*
* Types for devices, inodes and offsets.
*/
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 86ce53d..6f28dfa 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -529,8 +529,7 @@ NTSTATUS cli_echo(struct cli_state *cli, uint16_t num_echos, DATA_BLOB data)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 61cb8b5..9e1975b 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -372,8 +372,7 @@ NTSTATUS cli_posix_symlink(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -513,8 +512,7 @@ NTSTATUS cli_posix_readlink(struct cli_state *cli, const char *fname,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -577,8 +575,7 @@ NTSTATUS cli_posix_hardlink(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -688,8 +685,7 @@ NTSTATUS cli_posix_getfacl(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -819,8 +815,7 @@ NTSTATUS cli_posix_stat(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -933,8 +928,7 @@ NTSTATUS cli_posix_chmod(struct cli_state *cli, const char *fname, mode_t mode)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1003,8 +997,7 @@ NTSTATUS cli_posix_chown(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1130,8 +1123,7 @@ NTSTATUS cli_rename(struct cli_state *cli, const char *fname_src, const char *fn
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1271,8 +1263,7 @@ NTSTATUS cli_ntrename(struct cli_state *cli, const char *fname_src, const char *
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1333,8 +1324,7 @@ NTSTATUS cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const cha
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1446,8 +1436,7 @@ NTSTATUS cli_unlink(struct cli_state *cli, const char *fname, uint16_t mayhave_a
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1556,8 +1545,7 @@ NTSTATUS cli_mkdir(struct cli_state *cli, const char *dname)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1666,8 +1654,7 @@ NTSTATUS cli_rmdir(struct cli_state *cli, const char *dname)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1780,8 +1767,7 @@ NTSTATUS cli_nt_delete_on_close(struct cli_state *cli, uint16_t fnum, bool flag)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -2719,8 +2705,7 @@ NTSTATUS cli_close(struct cli_state *cli, uint16_t fnum)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -2833,8 +2818,7 @@ NTSTATUS cli_ftruncate(struct cli_state *cli, uint16_t fnum, uint64_t size)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3007,8 +2991,7 @@ NTSTATUS cli_unlock(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3176,8 +3159,7 @@ NTSTATUS cli_unlock64(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3347,8 +3329,7 @@ NTSTATUS cli_posix_lock(struct cli_state *cli, uint16_t fnum,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3411,8 +3392,7 @@ NTSTATUS cli_posix_unlock(struct cli_state *cli, uint16_t fnum, uint64_t offset,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3568,8 +3548,7 @@ NTSTATUS cli_getattrE(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3725,8 +3704,7 @@ NTSTATUS cli_getatr(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3850,8 +3828,7 @@ NTSTATUS cli_setattrE(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -3982,8 +3959,7 @@ NTSTATUS cli_setatr(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -4101,8 +4077,7 @@ NTSTATUS cli_chkpath(struct cli_state *cli, const char *path)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -4213,8 +4188,7 @@ NTSTATUS cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -4437,8 +4411,7 @@ NTSTATUS cli_ctemp(struct cli_state *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -5026,8 +4999,7 @@ NTSTATUS cli_posix_open(struct cli_state *cli, const char *fname,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -5084,8 +5056,7 @@ NTSTATUS cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -5189,8 +5160,7 @@ NTSTATUS cli_posix_unlink(struct cli_state *cli, const char *fname)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -5250,8 +5220,7 @@ NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname)
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index d4e4451..907d1d2 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -149,8 +149,7 @@ NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16_t *pmajor,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 2e50239..94bbc57 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -505,8 +505,7 @@ NTSTATUS cli_list_old(struct cli_state *cli, const char *mask,
if (req == NULL) {
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
status = cli_list_old_recv(req, frame, &finfo);
@@ -966,8 +965,7 @@ NTSTATUS cli_list(struct cli_state *cli, const char *mask, uint16_t attribute,
if (req == NULL) {
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
diff --git a/source3/libsmb/climessage.c b/source3/libsmb/climessage.c
index f0481fa..34fcc1a 100644
--- a/source3/libsmb/climessage.c
+++ b/source3/libsmb/climessage.c
@@ -408,8 +408,7 @@ NTSTATUS cli_message(struct cli_state *cli, const char *host,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index adcd98b..6bcbd02 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -690,8 +690,7 @@ NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
@@ -1076,8 +1075,7 @@ NTSTATUS cli_writeall(struct cli_state *cli, uint16_t fnum, uint16_t mode,
if (req == NULL) {
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
@@ -1435,8 +1433,7 @@ NTSTATUS cli_push(struct cli_state *cli, uint16_t fnum, uint16_t mode,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 6cff27a..d0fb774 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1984,8 +1984,7 @@ NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
goto fail;
}
- if (!tevent_req_poll(req, ev)) {
- status = map_nt_error_from_unix(errno);
+ if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c
index 7f2f1bf..b928b7c 100644
--
Samba Shared Repository
More information about the samba-cvs
mailing list