From f9864940eb394e30f4685ccc712916c6d68d4619 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 3 Apr 2019 12:25:24 +0200 Subject: [PATCH] Kernel: Move FS-related files into Kernel/FileSystem/ --- Kernel/FileDescriptor.cpp | 2 +- Kernel/FileDescriptor.h | 4 ++-- Kernel/{ => FileSystem}/DevPtsFS.cpp | 4 ++-- Kernel/{ => FileSystem}/DevPtsFS.h | 2 +- Kernel/{ => FileSystem}/DiskBackedFileSystem.cpp | 0 Kernel/{ => FileSystem}/DiskBackedFileSystem.h | 0 Kernel/{ => FileSystem}/Ext2FileSystem.cpp | 0 Kernel/{ => FileSystem}/Ext2FileSystem.h | 0 Kernel/{ => FileSystem}/FileSystem.cpp | 0 Kernel/{ => FileSystem}/FileSystem.h | 0 Kernel/{ => FileSystem}/InodeIdentifier.h | 0 Kernel/{ => FileSystem}/InodeMetadata.h | 0 Kernel/{ => FileSystem}/ProcFS.cpp | 2 +- Kernel/{ => FileSystem}/ProcFS.h | 2 +- Kernel/{ => FileSystem}/SyntheticFileSystem.cpp | 4 ++-- Kernel/{ => FileSystem}/SyntheticFileSystem.h | 0 Kernel/{ => FileSystem}/VirtualFileSystem.cpp | 0 Kernel/{ => FileSystem}/VirtualFileSystem.h | 0 Kernel/{ => FileSystem}/ext2_fs.h | 0 Kernel/{ => FileSystem}/ext2_types.h | 0 Kernel/LocalSocket.cpp | 2 +- Kernel/Makefile | 14 +++++++------- Kernel/MemoryManager.h | 2 +- Kernel/Process.cpp | 2 +- Kernel/Process.h | 2 +- Kernel/SlavePTY.cpp | 2 +- Kernel/init.cpp | 8 ++++---- Kernel/sync.sh | 1 + 28 files changed, 27 insertions(+), 26 deletions(-) rename Kernel/{ => FileSystem}/DevPtsFS.cpp (93%) rename Kernel/{ => FileSystem}/DevPtsFS.h (91%) rename Kernel/{ => FileSystem}/DiskBackedFileSystem.cpp (100%) rename Kernel/{ => FileSystem}/DiskBackedFileSystem.h (100%) rename Kernel/{ => FileSystem}/Ext2FileSystem.cpp (100%) rename Kernel/{ => FileSystem}/Ext2FileSystem.h (100%) rename Kernel/{ => FileSystem}/FileSystem.cpp (100%) rename Kernel/{ => FileSystem}/FileSystem.h (100%) rename Kernel/{ => FileSystem}/InodeIdentifier.h (100%) rename Kernel/{ => FileSystem}/InodeMetadata.h (100%) rename Kernel/{ => FileSystem}/ProcFS.cpp (99%) rename Kernel/{ => FileSystem}/ProcFS.h (98%) rename Kernel/{ => FileSystem}/SyntheticFileSystem.cpp (98%) rename Kernel/{ => FileSystem}/SyntheticFileSystem.h (100%) rename Kernel/{ => FileSystem}/VirtualFileSystem.cpp (100%) rename Kernel/{ => FileSystem}/VirtualFileSystem.h (100%) rename Kernel/{ => FileSystem}/ext2_fs.h (100%) rename Kernel/{ => FileSystem}/ext2_types.h (100%) diff --git a/Kernel/FileDescriptor.cpp b/Kernel/FileDescriptor.cpp index 42e144cc1e..78661f1ff2 100644 --- a/Kernel/FileDescriptor.cpp +++ b/Kernel/FileDescriptor.cpp @@ -1,5 +1,5 @@ #include "FileDescriptor.h" -#include "FileSystem.h" +#include #include "CharacterDevice.h" #include #include "UnixTypes.h" diff --git a/Kernel/FileDescriptor.h b/Kernel/FileDescriptor.h index 4fa5aa6dae..80b3827c64 100644 --- a/Kernel/FileDescriptor.h +++ b/Kernel/FileDescriptor.h @@ -1,7 +1,7 @@ #pragma once -#include "VirtualFileSystem.h" -#include "InodeMetadata.h" +#include +#include #include "FIFO.h" #include #include diff --git a/Kernel/DevPtsFS.cpp b/Kernel/FileSystem/DevPtsFS.cpp similarity index 93% rename from Kernel/DevPtsFS.cpp rename to Kernel/FileSystem/DevPtsFS.cpp index e4c9ac8e0e..f66d846750 100644 --- a/Kernel/DevPtsFS.cpp +++ b/Kernel/FileSystem/DevPtsFS.cpp @@ -1,6 +1,6 @@ -#include +#include #include -#include +#include #include static DevPtsFS* s_the; diff --git a/Kernel/DevPtsFS.h b/Kernel/FileSystem/DevPtsFS.h similarity index 91% rename from Kernel/DevPtsFS.h rename to Kernel/FileSystem/DevPtsFS.h index 2355523cda..9898ea0786 100644 --- a/Kernel/DevPtsFS.h +++ b/Kernel/FileSystem/DevPtsFS.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include class Process; class SlavePTY; diff --git a/Kernel/DiskBackedFileSystem.cpp b/Kernel/FileSystem/DiskBackedFileSystem.cpp similarity index 100% rename from Kernel/DiskBackedFileSystem.cpp rename to Kernel/FileSystem/DiskBackedFileSystem.cpp diff --git a/Kernel/DiskBackedFileSystem.h b/Kernel/FileSystem/DiskBackedFileSystem.h similarity index 100% rename from Kernel/DiskBackedFileSystem.h rename to Kernel/FileSystem/DiskBackedFileSystem.h diff --git a/Kernel/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp similarity index 100% rename from Kernel/Ext2FileSystem.cpp rename to Kernel/FileSystem/Ext2FileSystem.cpp diff --git a/Kernel/Ext2FileSystem.h b/Kernel/FileSystem/Ext2FileSystem.h similarity index 100% rename from Kernel/Ext2FileSystem.h rename to Kernel/FileSystem/Ext2FileSystem.h diff --git a/Kernel/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp similarity index 100% rename from Kernel/FileSystem.cpp rename to Kernel/FileSystem/FileSystem.cpp diff --git a/Kernel/FileSystem.h b/Kernel/FileSystem/FileSystem.h similarity index 100% rename from Kernel/FileSystem.h rename to Kernel/FileSystem/FileSystem.h diff --git a/Kernel/InodeIdentifier.h b/Kernel/FileSystem/InodeIdentifier.h similarity index 100% rename from Kernel/InodeIdentifier.h rename to Kernel/FileSystem/InodeIdentifier.h diff --git a/Kernel/InodeMetadata.h b/Kernel/FileSystem/InodeMetadata.h similarity index 100% rename from Kernel/InodeMetadata.h rename to Kernel/FileSystem/InodeMetadata.h diff --git a/Kernel/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp similarity index 99% rename from Kernel/ProcFS.cpp rename to Kernel/FileSystem/ProcFS.cpp index bfa183a49f..d08e896f6d 100644 --- a/Kernel/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -1,6 +1,6 @@ #include "ProcFS.h" #include "Process.h" -#include +#include #include "system.h" #include "MemoryManager.h" #include "StdLib.h" diff --git a/Kernel/ProcFS.h b/Kernel/FileSystem/ProcFS.h similarity index 98% rename from Kernel/ProcFS.h rename to Kernel/FileSystem/ProcFS.h index 23a84062f2..849cff70a7 100644 --- a/Kernel/ProcFS.h +++ b/Kernel/FileSystem/ProcFS.h @@ -2,7 +2,7 @@ #include #include -#include +#include class Process; diff --git a/Kernel/SyntheticFileSystem.cpp b/Kernel/FileSystem/SyntheticFileSystem.cpp similarity index 98% rename from Kernel/SyntheticFileSystem.cpp rename to Kernel/FileSystem/SyntheticFileSystem.cpp index bcf37dcf0f..d0cabdc209 100644 --- a/Kernel/SyntheticFileSystem.cpp +++ b/Kernel/FileSystem/SyntheticFileSystem.cpp @@ -1,5 +1,5 @@ -#include "SyntheticFileSystem.h" -#include "FileDescriptor.h" +#include +#include #include #include diff --git a/Kernel/SyntheticFileSystem.h b/Kernel/FileSystem/SyntheticFileSystem.h similarity index 100% rename from Kernel/SyntheticFileSystem.h rename to Kernel/FileSystem/SyntheticFileSystem.h diff --git a/Kernel/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp similarity index 100% rename from Kernel/VirtualFileSystem.cpp rename to Kernel/FileSystem/VirtualFileSystem.cpp diff --git a/Kernel/VirtualFileSystem.h b/Kernel/FileSystem/VirtualFileSystem.h similarity index 100% rename from Kernel/VirtualFileSystem.h rename to Kernel/FileSystem/VirtualFileSystem.h diff --git a/Kernel/ext2_fs.h b/Kernel/FileSystem/ext2_fs.h similarity index 100% rename from Kernel/ext2_fs.h rename to Kernel/FileSystem/ext2_fs.h diff --git a/Kernel/ext2_types.h b/Kernel/FileSystem/ext2_types.h similarity index 100% rename from Kernel/ext2_types.h rename to Kernel/FileSystem/ext2_types.h diff --git a/Kernel/LocalSocket.cpp b/Kernel/LocalSocket.cpp index d14cf3ca13..d9f543a99f 100644 --- a/Kernel/LocalSocket.cpp +++ b/Kernel/LocalSocket.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include //#define DEBUG_LOCAL_SOCKET diff --git a/Kernel/Makefile b/Kernel/Makefile index 85ef1c7e55..dd157bfa3c 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -15,7 +15,6 @@ KERNEL_OBJS = \ Console.o \ IRQHandler.o \ kprintf.o \ - ProcFS.o \ RTC.o \ TTY.o \ PTYMultiplexer.o \ @@ -28,7 +27,7 @@ KERNEL_OBJS = \ ELFImage.o \ ELFLoader.o \ KSyms.o \ - DevPtsFS.o \ + FileSystem/DevPtsFS.o \ BXVGADevice.o \ PCI.o \ PS2MouseDevice.o \ @@ -44,6 +43,7 @@ KERNEL_OBJS = \ Net/NetworkTask.o VFS_OBJS = \ + FileSystem/ProcFS.o \ DiskDevice.o \ Device.o \ CharacterDevice.o \ @@ -52,12 +52,12 @@ VFS_OBJS = \ FullDevice.o \ ZeroDevice.o \ RandomDevice.o \ - FileSystem.o \ - DiskBackedFileSystem.o \ - Ext2FileSystem.o \ - VirtualFileSystem.o \ + FileSystem/FileSystem.o \ + FileSystem/DiskBackedFileSystem.o \ + FileSystem/Ext2FileSystem.o \ + FileSystem/VirtualFileSystem.o \ FileDescriptor.o \ - SyntheticFileSystem.o + FileSystem/SyntheticFileSystem.o AK_OBJS = \ ../AK/String.o \ diff --git a/Kernel/MemoryManager.h b/Kernel/MemoryManager.h index 60e7fc8c9b..bc1340695b 100644 --- a/Kernel/MemoryManager.h +++ b/Kernel/MemoryManager.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #define PAGE_ROUND_UP(x) ((((dword)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1))) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index d8c41d662d..731a27b353 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -5,7 +5,7 @@ #include "i386.h" #include "system.h" #include -#include +#include #include #include "ELFLoader.h" #include "MemoryManager.h" diff --git a/Kernel/Process.h b/Kernel/Process.h index 826bcd194f..e7ce808ee3 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -3,7 +3,7 @@ #include "types.h" #include "TTY.h" #include "Syscall.h" -#include +#include #include #include #include diff --git a/Kernel/SlavePTY.cpp b/Kernel/SlavePTY.cpp index 980ac598e0..96f07e151f 100644 --- a/Kernel/SlavePTY.cpp +++ b/Kernel/SlavePTY.cpp @@ -1,6 +1,6 @@ #include "SlavePTY.h" #include "MasterPTY.h" -#include "DevPtsFS.h" +#include #include //#define SLAVEPTY_DEBUG diff --git a/Kernel/init.cpp b/Kernel/init.cpp index e896dce1dc..b5310b0b91 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -12,16 +12,16 @@ #include #include #include -#include -#include +#include +#include #include "MemoryManager.h" -#include "ProcFS.h" +#include #include "RTC.h" #include "VirtualConsole.h" #include "Scheduler.h" #include "PS2MouseDevice.h" #include "PTYMultiplexer.h" -#include "DevPtsFS.h" +#include #include "BXVGADevice.h" #include #include diff --git a/Kernel/sync.sh b/Kernel/sync.sh index 2cd3585008..6df8867014 100755 --- a/Kernel/sync.sh +++ b/Kernel/sync.sh @@ -94,5 +94,6 @@ cp -v ../Servers/LookupServer/LookupServer mnt/bin/LookupServer cp -v ../Servers/WindowServer/WindowServer mnt/bin/WindowServer cp -v kernel.map mnt/ sh sync-local.sh +sync umount mnt sync