Annotation of embedtools/src/dumpcfg.c, revision 1.1.2.2
1.1.2.1 misho 1: #include "global.h"
2:
3:
4: int Verbose;
1.1.2.2 ! misho 5: sl_config cfg[2];
1.1.2.1 misho 6:
7:
8: int main(int argc, char **argv)
9: {
1.1.2.2 ! misho 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]);
1.1.2.1 misho 42: return 0;
43: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>