diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2011-12-04 21:30:26 +0100 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2011-12-04 21:30:26 +0100 |
commit | 9b72cb363a8263ee11d323068f755fe62cadf97b (patch) | |
tree | 18db5de004291b33fb39293906b8607ce735970b /src | |
parent | gtk-redshift: Also set "Hidden" property in autostart file (as specified in XDG autostart standard). (diff) | |
download | redshift-ng-9b72cb363a8263ee11d323068f755fe62cadf97b.tar.gz redshift-ng-9b72cb363a8263ee11d323068f755fe62cadf97b.tar.bz2 redshift-ng-9b72cb363a8263ee11d323068f755fe62cadf97b.tar.xz |
Print status message when redshift is enabled/disabled by SIGUSR1.
Diffstat (limited to 'src')
-rw-r--r-- | src/redshift.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/redshift.c b/src/redshift.c index 7247f54..fc6ed2f 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with Redshift. If not, see <http://www.gnu.org/licenses/>. - Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com> + Copyright (c) 2011 Jon Lund Steffensen <jonlst@gmail.com> */ #ifdef HAVE_CONFIG_H @@ -661,11 +661,10 @@ main(int argc, char *argv[]) /* Flush messages consistently even if redirected to a pipe or file. Change the flush behaviour to line-buffered, without - changing the actual buffers being used. - */ - setvbuf (stdout, NULL, _IOLBF, 0); - setvbuf (stderr, NULL, _IOLBF, 0); - + changing the actual buffers being used. */ + setvbuf(stdout, NULL, _IOLBF, 0); + setvbuf(stderr, NULL, _IOLBF, 0); + /* Parse command line arguments. */ int opt; while ((opt = getopt(argc, argv, "b:c:g:hl:m:oO:prt:vVx")) != -1) { @@ -1210,6 +1209,11 @@ main(int argc, char *argv[]) disabled = 0; } disable = 0; + + if (verbose) { + printf("Status: %s\n", disabled ? + "Disabled" : "Enabled"); + } } /* Check to see if exit signal was caught */ |