From 4426a8fa5b329c7a49d78d1825bf9251c2505dc4 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sun, 12 Sep 2010 13:44:15 +0200 Subject: [PATCH] The --stdin-config param is kinda pointless, just use -c /dev/stdin --- src/conky.cc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/conky.cc b/src/conky.cc index c98a211d..d11db153 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -365,8 +365,6 @@ struct information info; /* path to config file */ std::string current_config; -bool stdinconfig = false; - /* set to 1 if you want all text to be in uppercase */ static conky::simple_config_setting stuff_in_uppercase("uppercase", false, true); @@ -2880,7 +2878,6 @@ static void print_help(const char *prog_name) { " -y Y y position\n" #endif /* BUILD_X11 */ " -s, --for-scripts=TEXT render TEXT on stdout and exit, enclose TEXT by single quotes\n" - " -S, --stdin-config read configuration from stdin\n" " -t, --text=TEXT text to render, remember single quotes, like -t '$uptime'\n" " -u, --interval=SECS update interval\n" " -i COUNT number of times to update "PACKAGE_NAME" (and quit)\n" @@ -2937,7 +2934,6 @@ static const struct option longopts[] = { { "window-id", 1, NULL, 'w' }, #endif /* BUILD_X11 */ { "for-scripts", 1, NULL, 's' }, - { "stdin-config", 0, NULL, 'S' }, { "text", 1, NULL, 't' }, { "interval", 1, NULL, 'u' }, { "pause", 1, NULL, 'p' }, @@ -2945,21 +2941,6 @@ static const struct option longopts[] = { }; void set_current_config() { - /* set configfile to stdin if that's requested or check if specified config file is valid */ - if(stdinconfig) { - char mystdin[32]; -#define CONKYSTDIN "/proc/%u/fd/0" - sprintf(mystdin, CONKYSTDIN, getpid()); - current_config = mystdin; - } else if (not current_config.empty()) { - struct stat sb; - if (stat(current_config.c_str(), &sb) || - (!S_ISREG(sb.st_mode) && !S_ISLNK(sb.st_mode))) { - NORM_ERR("invalid configuration file '%s'\n", current_config.c_str()); - current_config.clear(); - } - } - /* load current_config, CONFIG_FILE or SYSTEM_CONFIG_FILE */ if (current_config.empty()) { @@ -3221,9 +3202,6 @@ int main(int argc, char **argv) case 'c': current_config = optarg; break; - case 'S': - stdinconfig = true; - break; case 'q': if (!freopen("/dev/null", "w", stderr)) CRIT_ERR(0, 0, "could not open /dev/null as stderr!");