- Timestamp:
- 03/17/10 02:41:17 (15 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common.c
r178 r182 29 29 const char* common_special_chars = ",\"\\"; 30 30 31 #define REGLOOKUP_VERSION "0.1 2.0"31 #define REGLOOKUP_VERSION "0.1?.0" 32 32 33 33 #define REGLOOKUP_EXIT_OK 0 … … 49 49 { 50 50 fprintf(stderr, message); 51 regfi_log_stop(); 51 52 exit(code); 52 53 } 53 54 54 void printMsgs( REGFI_FILE* f)55 { 56 char* msgs = regfi_ get_messages(f);55 void printMsgs() 56 { 57 char* msgs = regfi_log_get_str(); 57 58 if(msgs != NULL) 58 59 { … … 62 63 } 63 64 64 void clearMsgs( REGFI_FILE* f)65 { 66 char* msgs = regfi_ get_messages(f);65 void clearMsgs() 66 { 67 char* msgs = regfi_log_get_str(); 67 68 if(msgs != NULL) 68 69 free(msgs); -
trunk/src/reglookup-recover.c
r181 r182 827 827 } 828 828 829 if(print_verbose) 830 regfi_log_start(REGFI_LOG_ERROR|REGFI_LOG_WARN|REGFI_LOG_INFO); 831 else 832 regfi_log_start(REGFI_LOG_ERROR); 833 829 834 f = regfi_alloc(fd); 830 835 if(f == NULL) … … 833 838 bailOut(REGLOOKUP_EXIT_NOINPUT, "ERROR: Failed to create REGFI_FILE structure.\n"); 834 839 } 835 836 if(print_verbose)837 regfi_set_message_mask(f, REGFI_MSG_ERROR|REGFI_MSG_WARN|REGFI_MSG_INFO);838 else839 regfi_set_message_mask(f, REGFI_MSG_ERROR);840 840 841 841 if(print_header) … … 994 994 995 995 regfi_free(f); 996 regfi_log_stop(); 996 997 close(fd); 997 998 -
trunk/src/reglookup.c
r181 r182 619 619 registry_file = argv[argi]; 620 620 621 if(print_verbose) 622 regfi_log_start(REGFI_LOG_INFO|REGFI_LOG_WARN|REGFI_LOG_ERROR); 623 else 624 regfi_log_start(REGFI_LOG_ERROR|REGFI_LOG_WARN); 625 621 626 fd = openHive(registry_file); 622 627 if(fd < 0) … … 625 630 bailOut(REGLOOKUP_EXIT_NOINPUT, ""); 626 631 } 627 632 628 633 f = regfi_alloc(fd); 629 634 if(f == NULL) … … 633 638 } 634 639 635 if(print_verbose)636 regfi_set_message_mask(f, REGFI_MSG_INFO|REGFI_MSG_WARN|REGFI_MSG_ERROR);637 640 638 641 /* XXX: add command line option to choose output encoding */ … … 678 681 regfi_iterator_free(iter); 679 682 regfi_free(f); 683 regfi_log_stop(); 680 684 close(fd); 681 685
Note: See TracChangeset
for help on using the changeset viewer.