From 531b713c558fad56c20b9f9d1fa4e6fbb236b100 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 2 Feb 2019 13:09:37 +0100 Subject: [PATCH] lib/util: inline lib/util/util_runcmd.h again samba_runcmd_state should not be exposed! Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Feb 8 02:54:20 CET 2019 on sn-devel-144 --- lib/util/util_runcmd.c | 16 +++++++++++++++- lib/util/util_runcmd.h | 37 ------------------------------------- 2 files changed, 15 insertions(+), 38 deletions(-) delete mode 100644 lib/util/util_runcmd.h diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c index 78ac77f4946..3bb4cd83f68 100644 --- a/lib/util/util_runcmd.c +++ b/lib/util/util_runcmd.c @@ -27,11 +27,25 @@ #include "includes.h" #include "system/filesys.h" +#include #include "../lib/util/tevent_unix.h" -#include "../lib/util/util_runcmd.h" #include "../lib/util/tfork.h" #include "../lib/util/sys_rw.h" +struct samba_runcmd_state { + int stdout_log_level; + int stderr_log_level; + struct tevent_fd *fde_stdout; + struct tevent_fd *fde_stderr; + struct tevent_fd *fde_status; + int fd_stdin, fd_stdout, fd_stderr, fd_status; + char *arg0; + pid_t pid; + struct tfork *tfork; + char buf[1024]; + uint16_t buf_used; +}; + static void samba_runcmd_cleanup_fn(struct tevent_req *req, enum tevent_req_state req_state) { diff --git a/lib/util/util_runcmd.h b/lib/util/util_runcmd.h deleted file mode 100644 index 55329615a25..00000000000 --- a/lib/util/util_runcmd.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - run a child command - - Copyright (C) Andrew Tridgell 2010 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -*/ - -#include - -struct samba_runcmd_state { - int stdout_log_level; - int stderr_log_level; - struct tevent_fd *fde_stdout; - struct tevent_fd *fde_stderr; - struct tevent_fd *fde_status; - int fd_stdin, fd_stdout, fd_stderr, fd_status; - char *arg0; - pid_t pid; - struct tfork *tfork; - char buf[1024]; - uint16_t buf_used; -}; -- 2.34.1