Hi! > Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com> > --- > testcases/network/lib6/in6_02.c | 32 ++++++++++++++++++++++++++++++++ > 1 files changed, 32 insertions(+), 0 deletions(-) > > diff --git a/testcases/network/lib6/in6_02.c b/testcases/network/lib6/in6_02.c > index fea1827..dadb2a5 100644 > --- a/testcases/network/lib6/in6_02.c > +++ b/testcases/network/lib6/in6_02.c > @@ -255,4 +255,36 @@ void initest(void) > void setup(void) > { > TEST_PAUSE; > + > + tst_resm(TINFO, "get interface name from LHOST_IFACES var"); > + > + char *ifnames = getenv("LHOST_IFACES"); > + > + if (!ifnames) { > + tst_resm(TWARN, "LHOST_IFACES not defined, default to eth0"); > + return; > + }
Hmm, why not to use sscanf() instead? sscanf(ifnames, "%ms", &name); And even when we want to be compatible before glibc 2.7 (2007) we can do: static char *name[256]; sscanf(ifnames, "%255s", &name); > + tst_resm(TINFO, "change default 'eth0' name to '%s'", name); > + n2i[1].name = name; > } > -- > 1.7.1 > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Ltp-list mailing list > Ltp-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ltp-list -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list