aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2011-12-04 21:30:26 +0100
committerJon Lund Steffensen <jonlst@gmail.com>2011-12-04 21:30:26 +0100
commit9b72cb363a8263ee11d323068f755fe62cadf97b (patch)
tree18db5de004291b33fb39293906b8607ce735970b
parentgtk-redshift: Also set "Hidden" property in autostart file (as specified in XDG autostart standard). (diff)
downloadredshift-ng-9b72cb363a8263ee11d323068f755fe62cadf97b.tar.gz
redshift-ng-9b72cb363a8263ee11d323068f755fe62cadf97b.tar.bz2
redshift-ng-9b72cb363a8263ee11d323068f755fe62cadf97b.tar.xz
Print status message when redshift is enabled/disabled by SIGUSR1.
-rw-r--r--src/redshift.c16
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 */