Import backup from 2004-03-15
This commit is contained in:
1 parent
ab576bf18f
commit
7110307896
4 files changed
+160
-163
No files matched your search
+42
-33
@@ -1,33 +1,42 @@
|
||||
// vfs.c
|
||||
// Author: Josh Holtrop
|
||||
// Date: 03/11/04
|
||||
|
||||
#include "vfs.h"
|
||||
#include "hos_defines.h"
|
||||
|
||||
Volume *firstVolume = 0;
|
||||
|
||||
void vfs_init()
|
||||
{
|
||||
dword initrdLoaded = *(byte *)BOOT_HASRD;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Volume *vfs_newVolume()
|
||||
{
|
||||
Volume *vol = malloc(sizeof(Volume));
|
||||
vfs_getLastVolume()->link = vol;
|
||||
return vol;
|
||||
}
|
||||
|
||||
|
||||
Volume *vfs_getLastVolume()
|
||||
{
|
||||
Volume *vol = firstVolume;
|
||||
while (vol)
|
||||
vol = vol->link;
|
||||
return vol;
|
||||
}
|
||||
|
||||
|
||||
// vfs.c
|
||||
// Author: Josh Holtrop
|
||||
// Date: 03/11/04
|
||||
|
||||
#include "vfs.h"
|
||||
#include "hos_defines.h"
|
||||
|
||||
Volume *firstVolume = 0;
|
||||
Volume *rootVolume = 0;
|
||||
|
||||
void vfs_init()
|
||||
{
|
||||
if(*(byte *)BOOT_HASRD) //bootloader loaded an initial ram disk
|
||||
{
|
||||
Volume *initrd = vfs_newVolume();
|
||||
RamDisk *rd = rd_newDisk(0xC0200000, 1440*1024);
|
||||
initrd->diskDevice = rd;
|
||||
initrd->deviceType = VFS_RD;
|
||||
strcpy(initrd->label, "rd0");
|
||||
initrd->link = 0;
|
||||
rootVolume = initrd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Volume *vfs_newVolume()
|
||||
{
|
||||
Volume *vol = malloc(sizeof(Volume));
|
||||
vfs_getLastVolume()->link = vol;
|
||||
return vol;
|
||||
}
|
||||
|
||||
|
||||
Volume *vfs_getLastVolume()
|
||||
{
|
||||
Volume *vol = firstVolume;
|
||||
while (vol)
|
||||
vol = vol->link;
|
||||
return vol;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ void putHex(dword number)
|
||||
|
||||
void kio_putBCD(dword bcd)
|
||||
{
|
||||
putc(((bcd & 0xF) >> 4) + '0');
|
||||
putc(((bcd & 0xF0) >> 4) + '0');
|
||||
putc((bcd & 0xF) + '0');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
Exception: STATUS_ACCESS_VIOLATION at eip=00462A1A
|
||||
eax=00000000 ebx=00001000 ecx=0A04865C edx=00000200 esi=0A04724C edi=FFFFFE00
|
||||
ebp=0022EB88 esp=0022EB20 program=C:\cygwin\bin\ld.exe
|
||||
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
|
||||
Stack trace:
|
||||
Frame Function Args
|
||||
0022EB88 00462A1A (0A046CD8, 0022EC70, 0A04EF10, 610D3F69)
|
||||
0022EE68 00448567 (0A046CD8, 30303030, 0022EE00, 0A04E758)
|
||||
0022EEF8 0043FCA0 (0A046CD8, 0041BBDE, 77E88AC8, FFFFFFFF)
|
||||
0022EF40 0041C322 (0000001B, 6167241C, 0A0400A8, 0022EF98)
|
||||
0022EF80 61005DE0 (0022EF98, 00000000, 002304CC, 536CD652)
|
||||
0022FF90 61005EE5 (00000000, 00000000, 00000000, 00000000)
|
||||
End of stack trace
|
||||
Reference in new issue
Block a user