File:  [ELWIX - Embedded LightWeight unIX -] / embedtools / src / Attic / dumpcfg.c
Revision 1.1.2.2: download - view: text, annotated - select for diffs - revision graph
Wed Nov 25 13:01:06 2009 UTC (14 years, 7 months ago) by misho
Branches: tools1_0
...

    1: #include "global.h"
    2: 
    3: 
    4: int Verbose;
    5: sl_config cfg[2];
    6: 
    7: 
    8: int main(int argc, char **argv)
    9: {
   10: 	char ch;
   11: 	int idxmask = 0;
   12: 	register int i, idx;
   13: 
   14: 	while ((ch = getopt(argc, argv, "hvid")) != -1)
   15: 		switch (ch) {
   16: 			case 'v':
   17: 				Verbose++;
   18: 				break;
   19: 			case 'i':	// interfaces
   20: 				idxmask |= 1 << 0;
   21: 				break;
   22: 			case 'd':	// disks
   23: 				idxmask |= 1 << 1;
   24: 				break;
   25: 			case 'h':
   26: 			default:
   27: 				return 1;
   28: 		}
   29: 	argc -= optind;
   30: 	argv += optind;
   31: 
   32: 	for (idx = 0; 2 > idx; idx++)
   33: 		InitConfig(&cfg[idx]);
   34: 
   35: 	for (i = 0x2, idx = 0; i; i >>= 1, idx++)
   36: 		if (i & idxmask) {
   37: 			VERB(3) printf("Init empty config for section %d\n", idx);
   38: 		}
   39: 
   40: 	for (idx = 0; 2 > idx; idx++)
   41: 		UnloadConfig(&cfg[idx]);
   42: 	return 0;
   43: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>