Suggested cleanups from sortie

This commit is contained in:
Kevin Lange 2014-02-26 21:10:56 -08:00
parent ecf124ece4
commit 1655cfc600
5 changed files with 13 additions and 27 deletions

View File

@ -636,7 +636,7 @@ fs_node_t *kopen(char *filename, uint32_t flags) {
/*
* Dig through the (real) tree to find the file
*/
uint32_t depth = 0;
unsigned int depth = 0;
fs_node_t *node_ptr = malloc(sizeof(fs_node_t));
/* Find the mountpoint for this file */
fs_node_t *mount_point = get_mount_point(path, path_depth, &path_offset, &depth);

View File

@ -5,13 +5,13 @@
typedef struct page {
uint32_t present:1;
uint32_t rw:1;
uint32_t user:1;
uint32_t accessed:1;
uint32_t dirty:1;
uint32_t unused:7;
uint32_t frame:20;
unsigned int present:1;
unsigned int rw:1;
unsigned int user:1;
unsigned int accessed:1;
unsigned int dirty:1;
unsigned int unused:7;
unsigned int frame:20;
} __attribute__((packed)) page_t;
typedef struct page_table {

View File

@ -7,23 +7,9 @@
#define NULL ((void *)0UL)
#ifndef BOOTLOADER
typedef unsigned long uintptr_t;
#else
typedef unsigned short uintptr_t;
#endif
#include <stdint.h>
typedef unsigned long size_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef signed short int16_t;
typedef unsigned char uint8_t;
typedef signed char int8_t;
typedef unsigned long long uint64_t;
#define CHAR_BIT 8
#define INT32_MAX 0x7fffffffL
#define UINT32_MAX 0xffffffffL
#endif

View File

@ -49,7 +49,7 @@
/*
* multiboot i386 (pc) kernel entry point
*/
int main(struct multiboot *mboot, uint32_t mboot_mag, uintptr_t esp) {
int kmain(struct multiboot *mboot, uint32_t mboot_mag, uintptr_t esp) {
initial_esp = esp;
extern char * cmdline;

View File

@ -55,8 +55,8 @@ start:
; Disable interrupts
cli
; Call the C entry
extern main
call main
extern kmain
call kmain
jmp $