[svn] GnuPG - r4806 - trunk/tools

svn author marcus cvs at cvs.gnupg.org
Wed Aug 6 13:48:24 CEST 2008


Author: marcus
Date: 2008-08-06 13:48:23 +0200 (Wed, 06 Aug 2008)
New Revision: 4806

Modified:
   trunk/tools/ChangeLog
   trunk/tools/gpgconf-comp.c
Log:
Marcus Brinkmann  <marcus at g10code.de>

	* gpgconf-comp.c (retrieve_options_from_file): Transfer the
	NO_CHANGE flag from the file name option to the list option.


Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog	2008-08-01 10:51:11 UTC (rev 4805)
+++ trunk/tools/ChangeLog	2008-08-06 11:48:23 UTC (rev 4806)
@@ -1,3 +1,8 @@
+2008-08-06  Marcus Brinkmann  <marcus at g10code.de>
+
+	* gpgconf-comp.c (retrieve_options_from_file): Transfer the
+	NO_CHANGE flag from the file name option to the list option.
+
 2008-06-19  Werner Koch  <wk at g10code.com>
 
 	* gpgconf-comp.c (GC_ARG_TYPE_ALIAS_LIST): New.

Modified: trunk/tools/gpgconf-comp.c
===================================================================
--- trunk/tools/gpgconf-comp.c	2008-08-01 10:51:11 UTC (rev 4805)
+++ trunk/tools/gpgconf-comp.c	2008-08-06 11:48:23 UTC (rev 4806)
@@ -165,7 +165,7 @@
   /* The option name for the configuration filename of this backend.
      This must be an absolute filename.  It can be an option from a
      different backend (but then ordering of the options might
-     matter).  */
+     matter).  Note: This must be unique among all components.  */
   const char *option_config_filename;
 
   /* If this is a file backend rather than a program backend, then
@@ -1949,6 +1949,7 @@
 retrieve_options_from_file (gc_component_t component, gc_backend_t backend)
 {
   gc_option_t *list_option;
+  gc_option_t *config_option;
   char *list_filename;
   FILE *list_file;
   char *line = NULL;
@@ -2008,6 +2009,12 @@
   list_option->active = 1;
   list_option->value = list;
 
+  /* Fix up the read-only flag.  */
+  config_option = find_option
+    (component, gc_backend[backend].option_config_filename, GC_BACKEND_ANY);
+  if (config_option->flags & GC_OPT_FLAG_NO_CHANGE)
+    list_option->flags |= GC_OPT_FLAG_NO_CHANGE;
+
   if (list_file && fclose (list_file) && ferror (list_file))
     gc_error (1, errno, "error closing %s", list_filename);
   xfree (line);




More information about the Gnupg-commits mailing list