Index: trunk/psModules/src/config/pmConfigRecipes.c
===================================================================
--- trunk/psModules/src/config/pmConfigRecipes.c	(revision 10428)
+++ trunk/psModules/src/config/pmConfigRecipes.c	(revision 10436)
@@ -19,4 +19,31 @@
 static bool loadRecipeSymbols(pmConfig *config);
 static bool loadRecipeOptions(pmConfig *config);
+
+// use this function to select the options structure for the specified recipe
+// add additional command-line options to this metadata (before parsing the camera)
+psMetadata *pmConfigRecipeOptions (pmConfig *config, char *recipeName)
+{
+
+    // if the recipe is already defined in config->arguments, supplement
+    // save the recipe options onto config->arguments:RECIPES
+    psMetadata *options = psMetadataLookupMetadata(NULL, config->arguments, "OPTIONS");
+    if (!options) {
+        options = psMetadataAlloc ();
+        psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "OPTIONS",  PS_DATA_METADATA, "", options);
+    } else {
+        psMemIncrRefCounter (options); // so we can free options below if not allocated here
+    }
+
+    // look for the recipe defined in recipes
+    psMetadata *recipe = psMetadataLookupMetadata(NULL, options, recipeName);
+    if (!recipe) {
+        recipe = psMetadataAlloc ();
+        psMetadataAddPtr (options, PS_LIST_TAIL, recipeName,  PS_DATA_METADATA, "", recipe);
+    } else {
+        psMemIncrRefCounter (recipe); // so we can free options below if not allocated here
+    }
+    psFree (options);
+    return (recipe);
+}
 
 // this function may be called several times.  it attempts to load the recipe data from one of
