diff options
author | Roger Dingledine <arma@torproject.org> | 2005-12-27 02:46:53 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-12-27 02:46:53 +0000 |
commit | 5807bd0635cb66afb38cab8394e2f3d0a6f7712f (patch) | |
tree | 3e0534627561b7ff6123effffc6a6e4745138a61 /src/or/config.c | |
parent | b038dc9ecc6e81a1a0da75d02b156fbd77688232 (diff) | |
download | tor-5807bd0635cb66afb38cab8394e2f3d0a6f7712f.tar tor-5807bd0635cb66afb38cab8394e2f3d0a6f7712f.tar.gz |
make it clearer in the auto-generated config file that you
probably shouldn't be editing this one yourself.
svn:r5655
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index 34421406d..481db2526 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3191,6 +3191,8 @@ validate_data_directory(or_options_t *options) #define GENERATED_FILE_PREFIX "# This file was generated by Tor; " \ "if you edit it, comments will not be preserved" +#define GENERATED_FILE_COMMENT "# If you want a config file with " \ + "comments, look for torrc.orig.1 or similar" /** Save a configuration file for the configuration in <b>options</b> * into the file <b>fname</b>. If the file already exists, and @@ -3225,9 +3227,10 @@ write_configuration_file(const char *fname, or_options_t *options) goto err; } - len = strlen(new_conf)+128; + len = strlen(new_conf)+256; new_val = tor_malloc(len); - tor_snprintf(new_val, len, "%s\n\n%s", GENERATED_FILE_PREFIX, new_conf); + tor_snprintf(new_val, len, "%s\n%s\n\n%s", + GENERATED_FILE_PREFIX, GENERATED_FILE_COMMENTS, new_conf); if (rename_old) { int i = 1; |