build: generate docs
This commit is contained in:
parent
da34cfd17d
commit
4691a463c3
42
.github/workflows/doc.yml
vendored
Normal file
42
.github/workflows/doc.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
docs-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-page
|
||||
url: ${{ steps.deployement.outputs.page_url }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install doxygen graphviz
|
||||
- name: generate-docs
|
||||
run: |
|
||||
doxygen
|
||||
- name: setup-pages
|
||||
uses: actions/configure-pages@v4
|
||||
- name: upload-artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: './docs/html'
|
||||
- name: deploy-github-page
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
|
61
.gitignore
vendored
61
.gitignore
vendored
|
@ -1,30 +1,31 @@
|
|||
*.in
|
||||
*.o
|
||||
Makefile
|
||||
*~
|
||||
config.h
|
||||
*.log
|
||||
*.status
|
||||
stamp-h1
|
||||
*.cache
|
||||
.deps
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
ar-lib
|
||||
compile
|
||||
aclocal.m4
|
||||
*.a
|
||||
*.exe
|
||||
src/stpdfs-fuse
|
||||
|
||||
*.cmd
|
||||
*.symvers
|
||||
*.ko
|
||||
*.mod
|
||||
*.mod.*
|
||||
*.order
|
||||
|
||||
Debug/
|
||||
.vs/
|
||||
*.in
|
||||
*.o
|
||||
Makefile
|
||||
*~
|
||||
config.h
|
||||
*.log
|
||||
*.status
|
||||
stamp-h1
|
||||
*.cache
|
||||
.deps
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
ar-lib
|
||||
compile
|
||||
aclocal.m4
|
||||
*.a
|
||||
*.exe
|
||||
src/stpdfs-fuse
|
||||
|
||||
*.cmd
|
||||
*.symvers
|
||||
*.ko
|
||||
*.mod
|
||||
*.mod.*
|
||||
*.order
|
||||
|
||||
Debug/
|
||||
.vs/
|
||||
html/
|
10
README.org
10
README.org
|
@ -1,6 +1,6 @@
|
|||
* StupidFS
|
||||
|
||||
|
||||
*** License
|
||||
|
||||
* StupidFS
|
||||
|
||||
|
||||
*** License
|
||||
|
||||
StupidFS is dual-licensed under both CeCiLL-B and BSD3 licenses
|
2675
docs/doxygen-awesome.css
Normal file
2675
docs/doxygen-awesome.css
Normal file
File diff suppressed because it is too large
Load diff
BIN
docs/img/favicon.ico
Normal file
BIN
docs/img/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 307 KiB |
BIN
docs/img/logo.png
Normal file
BIN
docs/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
43
lib/stpdfs.h
43
lib/stpdfs.h
|
@ -1,20 +1,25 @@
|
|||
#ifndef STPDFS_H
|
||||
# define STPDFS_H 1
|
||||
|
||||
#define STPDFS_MAGIC 0x44505453
|
||||
|
||||
#define STPDFS_BLOCK_SIZE 512
|
||||
|
||||
struct stpdfs_superblock {
|
||||
uint32_t magic;
|
||||
uint32_t isize;
|
||||
uint32_t fsize;
|
||||
uint32_t free[100];
|
||||
uint8_t nfree;
|
||||
uint8_t flock;
|
||||
uint8_t ilock;
|
||||
uint8_t fmod;
|
||||
uint32_t time[2];
|
||||
} __attribute__((packed));
|
||||
|
||||
#ifndef STPDFS_H
|
||||
# define STPDFS_H 1
|
||||
|
||||
# include <stdint.h>
|
||||
|
||||
#define STPDFS_MAGIC 0x44505453
|
||||
|
||||
#define STPDFS_BLOCK_SIZE 512
|
||||
|
||||
/**
|
||||
* \brief StupidFS Superblock
|
||||
*/
|
||||
struct stpdfs_sb {
|
||||
uint32_t magic;
|
||||
uint32_t isize;
|
||||
uint32_t fsize;
|
||||
uint32_t free[100];
|
||||
uint8_t nfree;
|
||||
uint8_t flock;
|
||||
uint8_t ilock;
|
||||
uint8_t fmod;
|
||||
uint32_t time[2];
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif /* !STPDFS_H */
|
|
@ -1,20 +1,20 @@
|
|||
moduledir = @moduledir@
|
||||
KBUILD_VERBOSE = 1
|
||||
MOD_DEVDIR = $(PWD)
|
||||
|
||||
export module_DATA
|
||||
|
||||
EXTRA_PROGRAMS = stpdfs_module
|
||||
stpdfs_module_SOURCES = module_stpdfs.c
|
||||
module_DATA = module_stpdfs.o
|
||||
|
||||
$(module_DATA): $(stpdfs_module_SOURCES)
|
||||
mv Makefile Makefile.automake
|
||||
cp $(srcdir)/../Makefile.kernel Makefile
|
||||
CPPFLAGS="" CFLAGS="" LDFLAGS="" \
|
||||
$(MAKE) -C /lib/modules/$(shell uname -r)/build \
|
||||
ARCH="x86" CC="gcc" M=$(PWD) modules\
|
||||
KBUILD_VERBOSE=$(KBUILD_VERBOSE)
|
||||
mv Makefile.automake Makefile
|
||||
|
||||
moduledir = @moduledir@
|
||||
KBUILD_VERBOSE = 1
|
||||
MOD_DEVDIR = $(PWD)
|
||||
|
||||
export module_DATA
|
||||
|
||||
EXTRA_PROGRAMS = stpdfs_module
|
||||
stpdfs_module_SOURCES = module.c
|
||||
module_DATA = module.o
|
||||
|
||||
$(module_DATA): $(stpdfs_module_SOURCES)
|
||||
mv Makefile Makefile.automake
|
||||
cp $(srcdir)/../Makefile.kernel Makefile
|
||||
CPPFLAGS="" CFLAGS="" LDFLAGS="" \
|
||||
$(MAKE) -C /lib/modules/$(shell uname -r)/build \
|
||||
ARCH="x86" CC="gcc" M=$(PWD) modules\
|
||||
KBUILD_VERBOSE=$(KBUILD_VERBOSE)
|
||||
mv Makefile.automake Makefile
|
||||
|
||||
CLEANFILES = $(module_DATA) .$(module_DATA).flags $(module_DATA:.o=.mod.c) $(module_DATA:.o=.@kernelext@)
|
|
@ -1,24 +1,35 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
static int __init
|
||||
stpdfs_mod_init(void)
|
||||
{
|
||||
printk("Hello, world!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_init(stpdfs_mod_init);
|
||||
|
||||
static void __exit
|
||||
stpdfs_mod_exit(void)
|
||||
{
|
||||
printk("Goodbye, world!\n");
|
||||
}
|
||||
|
||||
module_exit(stpdfs_mod_exit);
|
||||
|
||||
MODULE_LICENSE("BSD3");
|
||||
MODULE_AUTHOR("d0p1");
|
||||
MODULE_DESCRIPTION("Stupid File System");
|
||||
MODULE_VERSION("1.0");
|
||||
/**
|
||||
* \addtogroup driver
|
||||
* @{
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
/**
|
||||
* \defgroup linux Linux Kernel Module
|
||||
* @{
|
||||
*/
|
||||
|
||||
static int __init
|
||||
stpdfs_mod_init(void)
|
||||
{
|
||||
printk("Hello, world!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_init(stpdfs_mod_init);
|
||||
|
||||
static void __exit
|
||||
stpdfs_mod_exit(void)
|
||||
{
|
||||
printk("Goodbye, world!\n");
|
||||
}
|
||||
|
||||
module_exit(stpdfs_mod_exit);
|
||||
|
||||
MODULE_LICENSE("CECILL-B or BSD3");
|
||||
MODULE_AUTHOR("d0p1");
|
||||
MODULE_DESCRIPTION("Stupid File System");
|
||||
MODULE_VERSION("1.0");
|
||||
|
||||
/** @} @} */
|
101
win32/driver.c
101
win32/driver.c
|
@ -1,45 +1,56 @@
|
|||
#include <ntddk.h>
|
||||
#include <wdf.h>
|
||||
|
||||
DRIVER_INITIALIZE DriverEntry;
|
||||
|
||||
PDEVICE_OBJECT StpdDiskFileSystemDeviceObject;
|
||||
|
||||
VOID
|
||||
StpdUnload(_In_ PDRIVER_OBJECT DriverObject)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DriverObject);
|
||||
|
||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: Driver unload\n"));
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DriverEntry(
|
||||
_In_ PDRIVER_OBJECT DriverObject,
|
||||
_In_ PUNICODE_STRING RegistryPath
|
||||
)
|
||||
{
|
||||
UNICODE_STRING ustr;
|
||||
NTSTATUS status;
|
||||
|
||||
UNREFERENCED_PARAMETER(RegistryPath);
|
||||
|
||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: DriverEntry\n"));
|
||||
|
||||
RtlInitUnicodeString(&ustr, L"\\Stpd");
|
||||
status = IoCreateDevice(DriverObject, 0, &ustr,
|
||||
FILE_DEVICE_DISK_FILE_SYSTEM, 0, FALSE,
|
||||
&StpdDiskFileSystemDeviceObject);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
return status;
|
||||
}
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable:28155, "these are all correct")
|
||||
#pragma prefast(disable:28169, "these are all correct")
|
||||
#pragma prefast(disable:28175, "this is a filesystem, touching FastIoDispatch is allowed")
|
||||
DriverObject->DriverUnload = StpdUnload;
|
||||
#pragma prefast(pop)
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* \addtogroup driver
|
||||
* @{
|
||||
*/
|
||||
#include <ntddk.h>
|
||||
#include <wdf.h>
|
||||
|
||||
/**
|
||||
* \defgroup win32 Windows Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
DRIVER_INITIALIZE DriverEntry;
|
||||
|
||||
PDEVICE_OBJECT StpdDiskFileSystemDeviceObject;
|
||||
|
||||
VOID
|
||||
StpdUnload(_In_ PDRIVER_OBJECT DriverObject)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DriverObject);
|
||||
|
||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: Driver unload\n"));
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DriverEntry(
|
||||
_In_ PDRIVER_OBJECT DriverObject,
|
||||
_In_ PUNICODE_STRING RegistryPath
|
||||
)
|
||||
{
|
||||
UNICODE_STRING ustr;
|
||||
NTSTATUS status;
|
||||
|
||||
UNREFERENCED_PARAMETER(RegistryPath);
|
||||
|
||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: DriverEntry\n"));
|
||||
|
||||
RtlInitUnicodeString(&ustr, L"\\Stpd");
|
||||
status = IoCreateDevice(DriverObject, 0, &ustr,
|
||||
FILE_DEVICE_DISK_FILE_SYSTEM, 0, FALSE,
|
||||
&StpdDiskFileSystemDeviceObject);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
return status;
|
||||
}
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable:28155, "these are all correct")
|
||||
#pragma prefast(disable:28169, "these are all correct")
|
||||
#pragma prefast(disable:28175, "this is a filesystem, touching FastIoDispatch is allowed")
|
||||
DriverObject->DriverUnload = StpdUnload;
|
||||
#pragma prefast(pop)
|
||||
return status;
|
||||
}
|
||||
|
||||
/** @} @} */
|
Loading…
Reference in a new issue