From: leslie Date: Sun, 1 Feb 2009 11:47:40 +0000 (+0800) Subject: add warning if no registered systems X-Git-Tag: 0.9.2~69 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=d82c43be7198b2dfc4bdf7d8dc2ffabe5504efa5;p=sasc-ng.git add warning if no registered systems --- diff --git a/system.c b/system.c index c86f31a..9e5a172 100644 --- a/system.c +++ b/system.c @@ -380,9 +380,12 @@ cSystem *cSystems::FindBySysIdent(int ident) bool cSystems::Init(const char *cfgdir) { + int num=0; PRINTF(L_CORE_LOAD,"** registered systems:"); - for(cSystemLink *sl=first; sl; sl=sl->next) + for(cSystemLink *sl=first; sl; sl=sl->next, num++) PRINTF(L_CORE_LOAD,"** %-16s (pri %3d)",sl->name,sl->pri); + if(num<1) + PRINTF(L_GEN_WARN,"No registered systems! Won't decode anything! Where are your libs?"); for(cSystemLink *sl=first; sl; sl=sl->next) if(!sl->Init(cfgdir)) return false; return true;