- Timestamp:
- Mar 3, 2009, 10:01:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_kern.c
r192 r223 86 86 N_("kernelcheckidt"), 87 87 sh_kern_set_idt 88 }, 89 { 90 N_("kernelcheckpci"), 91 sh_kern_set_pci 88 92 }, 89 93 { … … 120 124 static int ShKernDelay = 100; /* milliseconds */ 121 125 static int ShKernIDT = S_TRUE; 126 static int ShKernPCI = S_TRUE; 122 127 123 128 /* The address of system_call … … 979 984 */ 980 985 fd = open ( pcipath, O_RDWR ); 981 do { 982 status = write( fd, "1", 1 ); 983 } while (status < 0 && errno == EINTR); 984 close ( fd ); 985 986 check_rom(pcipath, name); 987 988 fd = open ( pcipath, O_RDWR ); 989 do { 990 status = write( fd, "0", 1 ); 991 } while (status < 0 && errno == EINTR); 992 close ( fd ); 986 if (fd) 987 { 988 do { 989 status = write( fd, "1", 1 ); 990 } while (status < 0 && errno == EINTR); 991 close ( fd ); 992 993 if (status > 0) 994 { 995 check_rom(pcipath, name); 996 997 fd = open ( pcipath, O_RDWR ); 998 if (fd) 999 { 1000 do { 1001 status = write( fd, "0", 1 ); 1002 } while (status < 0 && errno == EINTR); 1003 close ( fd ); 1004 } 1005 } 1006 } 993 1007 } 994 1008 return; … … 1001 1015 DIR * df; 1002 1016 struct dirent * entry; 1017 1018 if (ShKernPCI != S_TRUE) 1019 return; 1003 1020 1004 1021 sl_strlcpy(pci_dir, SYS_BUS_PCI, sizeof(pci_dir)); … … 1028 1045 closedir(df); 1029 1046 } 1047 return; 1030 1048 } 1031 1049 … … 1930 1948 } 1931 1949 1950 int sh_kern_set_pci (const char * c) 1951 { 1952 int i; 1953 SL_ENTER(_("sh_kern_set_pci")); 1954 i = sh_util_flagval(c, &ShKernPCI); 1955 SL_RETURN(i, _("sh_kern_set_pci")); 1956 } 1957 1932 1958 int sh_kern_set_sc_addr (const char * c) 1933 1959 {
Note:
See TracChangeset
for help on using the changeset viewer.