1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

Use tevent_req_poll_ntstatus

Kill 41 lines ..

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke
2015-04-28 14:00:06 +00:00
committed by Jeremy Allison
parent 12df833563
commit d87fd39501
8 changed files with 41 additions and 82 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -197,8 +197,7 @@ NTSTATUS rpc_transport_np_init(TALLOC_CTX *mem_ctx, 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;
}