From: Jussi Pakkanen Date: Thu, 27 Mar 2014 13:08:56 +0000 (+0200) Subject: phonesim: Add conf file override X-Git-Tag: upstream/1.15~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f76525961884352e10867f41a9257f27f47343f;p=platform%2Fupstream%2Fofono.git phonesim: Add conf file override OFONO_PHONESIM_CONFIG allows the configuration file location to be overriden from the default $CONFIGDIR/phonesim.conf (typically /etc) --- diff --git a/plugins/phonesim.c b/plugins/phonesim.c index 918d2ebf..e84bbf60 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -1071,7 +1071,7 @@ done: static int phonesim_init(void) { int err; - + char *conf_override = getenv("OFONO_PHONESIM_CONFIG"); err = ofono_modem_driver_register(&phonesim_driver); if (err < 0) return err; @@ -1081,7 +1081,10 @@ static int phonesim_init(void) ofono_gprs_context_driver_register(&context_driver); ofono_ctm_driver_register(&ctm_driver); - parse_config(CONFIGDIR "/phonesim.conf"); + if (conf_override) + parse_config(conf_override); + else + parse_config(CONFIGDIR "/phonesim.conf"); return 0; }