Changeset 9 for trunk/src/kern_head.c
- Timestamp:
- Jan 1, 2006, 11:55:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kern_head.c
r1 r9 713 713 } 714 714 715 #ifdef __OpenBSD__ 716 if (utbuf.release[0] == '3') 717 which = 38; 718 #else 715 719 if (utbuf.release[0] == '4') 716 720 which = 4; 717 721 else if (utbuf.release[0] == '5') 718 722 which = 5; 723 else if (utbuf.release[0] == '6') 724 which = 5; 725 #endif 719 726 else 720 727 { … … 757 764 exit(EXIT_FAILURE); 758 765 } 766 else if (i == 1) 767 { 768 fprintf(stderr, "check_sysent: kvm_nlist: _sysent not found\n"); 769 exit(EXIT_FAILURE); 770 } 771 else if (list[0].n_value == 0) 772 { 773 fprintf(stderr, "check_sysent: kvm_nlist: zero address for _sysent\n"); 774 exit(EXIT_FAILURE); 775 } 759 776 760 777 if (which == 4) 761 778 printf("\n/* Kernel %s, machine %s -- use table %s */\n\n", 762 779 utbuf.release, utbuf.machine, "callz_fbsd"); 763 if (which == 5)780 else if (which == 5 || which == 6) 764 781 printf("\n/* Kernel %s, machine %s -- use table %s */\n\n", 765 782 utbuf.release, utbuf.machine, "callz_fbsd5"); 783 else if (which == 38) 784 printf("\n/* Kernel %s, machine %s -- use table %s */\n\n", 785 utbuf.release, utbuf.machine, "callz_obsd"); 786 766 787 767 788 i = 0; … … 776 797 (utbuf.release[3] == '0')) 777 798 { 778 sys_list[336].n_name = callz_fbsd[ 290]; /* sendfile -> nosys */799 sys_list[336].n_name = callz_fbsd[151]; /* sendfile -> nosys */ 779 800 } 780 } else {801 } else if (which == 5 || which == 6) { 781 802 while ((callz_fbsd5[i] != NULL) && (i < SYS_MAXSYSCALL)) 782 803 { … … 786 807 } 787 808 } 809 else if (which == 38) { 810 while ((callz_obsd[i] != NULL) && (i < SYS_MAXSYSCALL)) 811 { 812 sys_list[i].n_name = callz_obsd[i]; 813 /* fprintf(stderr, "sys_list[%d] = %s\n", i, sys_list[i].n_name); */ 814 ++i; 815 } 816 } 817 788 818 count = i; 789 819 sys_list[i].n_name = NULL; … … 799 829 fprintf(stderr, "check_sysent: kvm_nlist: %d out of %d invalid.\n", 800 830 i, count); 801 fprintf(stderr, " Probably callz_fbsd in kern_head.c\n");831 fprintf(stderr, " Probably the table in kern_head.h\n"); 802 832 fprintf(stderr, " is not for your kernel version.\n"); 803 833 fprintf(stderr, " (No reason to worry, kcheck will "\ … … 832 862 sys_list[i].n_value != 0 && 833 863 0 != strcmp(sys_list[i].n_name, "_nosys") && 834 (unsigned long)sy.sy_call != sys_list[ 290].n_value)864 (unsigned long)sy.sy_call != sys_list[151].n_value) 835 865 { 836 866 fprintf(stderr,
Note:
See TracChangeset
for help on using the changeset viewer.