From 914bd788b9c16ddbafd44f6eb69eb61757742cf4 Mon Sep 17 00:00:00 2001 From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Tue, 22 Feb 2022 18:00:47 +0000 Subject: [PATCH] smartd.cpp: Ensure that '--warn-as-user=restricted' failure is visible in syslog. git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk@5324 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- smartmontools/ChangeLog | 3 +++ smartmontools/smartd.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog index ff29b612c..70574170e 100644 --- a/smartmontools/ChangeLog +++ b/smartmontools/ChangeLog @@ -2,6 +2,9 @@ $Id$ 2022-02-22 Christian Franke <franke@computer.org> + smartd.cpp: Ensure that '--warn-as-user=restricted' failure is + visible in syslog. + smartd.cpp: Add '-q *nodev0*' option variants. These change the exit status to 0 if there are no devices to monitor. diff --git a/smartmontools/smartd.cpp b/smartmontools/smartd.cpp index 5655b5bc3..96f3445be 100644 --- a/smartmontools/smartd.cpp +++ b/smartmontools/smartd.cpp @@ -2,7 +2,7 @@ * Home page of code is: https://www.smartmontools.org * * Copyright (C) 2002-11 Bruce Allen - * Copyright (C) 2008-21 Christian Franke + * Copyright (C) 2008-22 Christian Franke * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org> * Copyright (C) 2008 Oliver Bock <brevilo@users.sourceforge.net> * @@ -5312,7 +5312,7 @@ static int parse_options(int argc, char **argv) #ifdef _WIN32 if (warn_as_restr_user && !popen_as_restr_check()) { - debugmode = 1; + // debugmode=1 // would suppress messages to eventlog or log file PrintHead(); PrintOut(LOG_CRIT, "Option '--warn-as-user=restricted' is not effective if the current user\n"); PrintOut(LOG_CRIT, "is the local 'SYSTEM' or 'Administrator' account\n\n"); -- GitLab