1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

After strncmp bug correction

This commit is contained in:
Adrien Bourmault 2020-02-11 17:45:58 +01:00
parent bb762db823
commit 80214297c5
No known key found for this signature in database
GPG Key ID: AFEE5788AEE3F4EC
3 changed files with 5 additions and 170 deletions

View File

@ -133,4 +133,4 @@ IDT Overhaul
2020-02-06 @os-k-team <os-k-team@os-k.eu> 2020-02-06 @os-k-team <os-k-team@os-k.eu>
* Acpi : Root table detected and FADT ready to be parsed * Acpi : Root table detected and FADT ready to be parsed
* Shell : now prints a legal message * Shell : now prints a legal message
* dmesg : the new command to print line of the new debug buffer ! * dmesg : the new command to print line of the new debug buffer !

View File

@ -1,165 +0,0 @@
#=----------------------------------------------------------------------------=#
# GNU GPL OS/K #
# #
# Desc: #
# #
# #
# Copyright © 2018-2020 The OS/K Team #
# #
# This file is part of OS/K. #
# #
# OS/K is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# any later version. #
# #
# OS/K is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY# without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with OS/K. If not, see <https://www.gnu.org/licenses/>. #
#=----------------------------------------------------------------------------=#
.
├── boot
│   ├── grub
│   │   ├── grub.cfg
│   │   └── multiboot.pdf
│   ├── loader
│   │   ├── cpu
│   │   │   ├── cpu32.inc
│   │   │   └── cpu.inc
│   │   ├── io
│   │   │   └── terminal.inc
│   │   ├── mem
│   │   │   ├── management.inc
│   │   │   └── structures.inc
│   │   ├── multiboot
│   │   │   ├── check.inc
│   │   │   └── header.inc
│   │   └── loader.asm
│   └── folder.desc
├── build
│   ├── create_disk.sh
│   ├── install-os-k.sh
│   └── kernel.ld
├── include
│   ├── ex
│   │   ├── lock.h
│   │   └── malloc.h
│   ├── init
│   │   ├── boot.h
│   │   └── mboot.h
│   ├── io
│   │   ├── acpi.h
│   │   ├── ata.h
│   │   ├── cursor.h
│   │   ├── keyb.h
│   │   ├── spkr.h
│   │   └── vga.h
│   ├── ke
│   │   ├── cpuid.h
│   │   ├── idt.h
│   │   ├── proc.h
│   │   ├── sched.h
│   │   ├── spinlock.h
│   │   └── time.h
│   ├── lib
│   │   ├── buf.h
│   │   └── list.h
│   ├── mm
│   │   ├── gdt.h
│   │   ├── heap.h
│   │   ├── malloc.h
│   │   ├── map.h
│   │   ├── paging.h
│   │   └── palloc.h
│   ├── po
│   │   └── shtdwn.h
│   ├── sh
│   │   ├── argv.h
│   │   └── shell.h
│   ├── asm.h
│   ├── errno.h
│   ├── kernel.h
│   ├── libc.h
│   └── vers.h
├── kaleid
│   ├── kernel
│   │   ├── init
│   │   │   ├── info.c
│   │   │   ├── init.c
│   │   │   ├── ssp.c
│   │   │   └── table.c
│   │   ├── io
│   │   │   ├── acpi.c
│   │   │   ├── ata.asm
│   │   │   ├── ata.c
│   │   │   ├── cursor.c
│   │   │   ├── keyb.c
│   │   │   ├── scan.c
│   │   │   ├── spkr.c
│   │   │   └── vga.c
│   │   ├── ke
│   │   │   ├── cpuf.asm
│   │   │   ├── cpuf.inc
│   │   │   ├── cpuid.c
│   │   │   ├── idt.c
│   │   │   ├── isr.asm
│   │   │   ├── log.c
│   │   │   ├── panic.c
│   │   │   ├── pit.c
│   │   │   └── rtc.c
│   │   ├── mm
│   │   │   ├── gdt.asm
│   │   │   ├── gdt.c
│   │   │   ├── heap.c
│   │   │   ├── malloc.c
│   │   │   ├── map.c
│   │   │   ├── paging.asm
│   │   │   ├── paging.c
│   │   │   └── palloc.c
│   │   ├── po
│   │   │   └── shtdwn.c
│   │   ├── ps
│   │   │   └── sched.c
│   │   └── sh
│   │   ├── argv.c
│   │   ├── musage.c
│   │   ├── shcmds.c
│   │   ├── shell.c
│   │   ├── shell.h
│   │   └── testcmds.c
│   ├── libbuf
│   │   ├── bclose.c
│   │   ├── bflush.c
│   │   ├── bgetc.c
│   │   ├── bmisc.c
│   │   ├── bopen.c
│   │   ├── bprint.c
│   │   ├── bputc.c
│   │   ├── bread.c
│   │   ├── bscan.c
│   │   ├── bscroll.c
│   │   └── bwrite.c
│   └── libc
│   ├── atoi.c
│   ├── ctype.c
│   ├── errno.c
│   ├── itoa.c
│   ├── mem.c
│   ├── rand.c
│   ├── sprintf.c
│   ├── string.c
│   └── strtol.c
├── AUTHORS
├── ChangeLog
├── COPYING
├── Makefile
├── ProjectTree
└── README.md
28 directories, 109 files

View File

@ -92,7 +92,7 @@ static inline RSDPDescriptor_t *IoFindRSDP()
(ulong)rsdp < (ulong)0x0009FFFF; // EBDA end (ulong)rsdp < (ulong)0x0009FFFF; // EBDA end
rsdp++) { rsdp++) {
if (!strncmp(rsdp, "RSD PTR", 6)) { if (!strncmp(rsdp, "RSD PTR", 7)) {
return (RSDPDescriptor_t *)rsdp; return (RSDPDescriptor_t *)rsdp;
} }
} }
@ -102,7 +102,7 @@ static inline RSDPDescriptor_t *IoFindRSDP()
(ulong)rsdp < (ulong)0x000FFFFF; // BDA end (ulong)rsdp < (ulong)0x000FFFFF; // BDA end
rsdp++) { rsdp++) {
if (!strncmp(rsdp, "RSD PTR", 6)) { if (!strncmp(rsdp, "RSD PTR", 7)) {
return (RSDPDescriptor_t *)rsdp; return (RSDPDescriptor_t *)rsdp;
} }
} }
@ -221,7 +221,7 @@ static inline void IoSearchAcpiTables(void)
checksum = DoChecksum(table, (size_t)table->length, 0, 0); checksum = DoChecksum(table, (size_t)table->length, 0, 0);
if (!checksum) { if (!checksum) {
for (ulong i=0; i < N_SDT_TYPES; i++) { for (ulong i=0; i < N_SDT_TYPES; i++) {
if (!strncmp(table->signature, SDTChar[i], 3)) { if (!strncmp(table->signature, SDTChar[i], 4)) {
DebugLog("ACPI System Table %s (OEM %s) length %d [%p]\n", DebugLog("ACPI System Table %s (OEM %s) length %d [%p]\n",
SDTChar[i], SDTChar[i],
table->OEMID, table->OEMID,
@ -247,7 +247,7 @@ static inline void IoSearchAcpiTables(void)
checksum = DoChecksum(dsdt, (size_t)dsdt->length, 0, 0); checksum = DoChecksum(dsdt, (size_t)dsdt->length, 0, 0);
if (!checksum) { if (!checksum) {
if (!strncmp(dsdt->signature, SDTChar[SDT_DSDT], 3)) { if (!strncmp(dsdt->signature, SDTChar[SDT_DSDT], 4)) {
DebugLog("ACPI System Table %s (OEM %s) length %d [%p]\n", DebugLog("ACPI System Table %s (OEM %s) length %d [%p]\n",
SDTChar[SDT_DSDT], SDTChar[SDT_DSDT],
dsdt->OEMID, dsdt->OEMID,