#include "conn_tdb.h"
#include "serverid.h"
#include "status_profile.h"
+#include "status.h"
#include "smbd/notifyd/notifyd_db.h"
#include "cmdline_contexts.h"
#include "locking/leases_db.h"
int profile_only = 0;
bool show_processes, show_locks, show_shares;
bool show_notify = false;
- bool resolve_uids = false;
poptContext pc = NULL;
+ struct traverse_state state = {0};
struct poptOption long_options[] = {
POPT_AUTOHELP
{
char *db_path;
bool ok;
+ state.resolve_uids = false;
+
smb_init_locale();
ok = samba_cmdline_init(frame,
do_checks = false;
break;
case OPT_RESOLVE_UIDS:
- resolve_uids = true;
+ state.resolve_uids = true;
break;
case POPT_ERROR_BADOPT:
fprintf(stderr, "\nInvalid option %s: %s\n\n",
goto done;
}
- result = share_entry_forall(print_share_mode, &resolve_uids);
+ result = share_entry_forall(print_share_mode, &state.resolve_uids);
if (result == 0) {
fprintf(stderr, "No locked files\n");
--- /dev/null
+/*
+ * Samba Unix/Linux SMB client library
+ * State struct
+ * Copyright (C) Jule Anger 2022
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef STATUS_H
+#define STATUS_H
+
+struct traverse_state {
+ bool resolve_uids;
+};
+
+#endif