#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
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;