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
|
*.in
|
||||||
*.o
|
*.o
|
||||||
Makefile
|
Makefile
|
||||||
*~
|
*~
|
||||||
config.h
|
config.h
|
||||||
*.log
|
*.log
|
||||||
*.status
|
*.status
|
||||||
stamp-h1
|
stamp-h1
|
||||||
*.cache
|
*.cache
|
||||||
.deps
|
.deps
|
||||||
configure
|
configure
|
||||||
depcomp
|
depcomp
|
||||||
install-sh
|
install-sh
|
||||||
missing
|
missing
|
||||||
ar-lib
|
ar-lib
|
||||||
compile
|
compile
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
*.a
|
*.a
|
||||||
*.exe
|
*.exe
|
||||||
src/stpdfs-fuse
|
src/stpdfs-fuse
|
||||||
|
|
||||||
*.cmd
|
*.cmd
|
||||||
*.symvers
|
*.symvers
|
||||||
*.ko
|
*.ko
|
||||||
*.mod
|
*.mod
|
||||||
*.mod.*
|
*.mod.*
|
||||||
*.order
|
*.order
|
||||||
|
|
||||||
Debug/
|
Debug/
|
||||||
.vs/
|
.vs/
|
||||||
|
html/
|
10
README.org
10
README.org
|
@ -1,6 +1,6 @@
|
||||||
* StupidFS
|
* StupidFS
|
||||||
|
|
||||||
|
|
||||||
*** License
|
*** License
|
||||||
|
|
||||||
StupidFS is dual-licensed under both CeCiLL-B and BSD3 licenses
|
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
|
#ifndef STPDFS_H
|
||||||
# define STPDFS_H 1
|
# define STPDFS_H 1
|
||||||
|
|
||||||
#define STPDFS_MAGIC 0x44505453
|
# include <stdint.h>
|
||||||
|
|
||||||
#define STPDFS_BLOCK_SIZE 512
|
#define STPDFS_MAGIC 0x44505453
|
||||||
|
|
||||||
struct stpdfs_superblock {
|
#define STPDFS_BLOCK_SIZE 512
|
||||||
uint32_t magic;
|
|
||||||
uint32_t isize;
|
/**
|
||||||
uint32_t fsize;
|
* \brief StupidFS Superblock
|
||||||
uint32_t free[100];
|
*/
|
||||||
uint8_t nfree;
|
struct stpdfs_sb {
|
||||||
uint8_t flock;
|
uint32_t magic;
|
||||||
uint8_t ilock;
|
uint32_t isize;
|
||||||
uint8_t fmod;
|
uint32_t fsize;
|
||||||
uint32_t time[2];
|
uint32_t free[100];
|
||||||
} __attribute__((packed));
|
uint8_t nfree;
|
||||||
|
uint8_t flock;
|
||||||
|
uint8_t ilock;
|
||||||
|
uint8_t fmod;
|
||||||
|
uint32_t time[2];
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
#endif /* !STPDFS_H */
|
#endif /* !STPDFS_H */
|
|
@ -1,20 +1,20 @@
|
||||||
moduledir = @moduledir@
|
moduledir = @moduledir@
|
||||||
KBUILD_VERBOSE = 1
|
KBUILD_VERBOSE = 1
|
||||||
MOD_DEVDIR = $(PWD)
|
MOD_DEVDIR = $(PWD)
|
||||||
|
|
||||||
export module_DATA
|
export module_DATA
|
||||||
|
|
||||||
EXTRA_PROGRAMS = stpdfs_module
|
EXTRA_PROGRAMS = stpdfs_module
|
||||||
stpdfs_module_SOURCES = module_stpdfs.c
|
stpdfs_module_SOURCES = module.c
|
||||||
module_DATA = module_stpdfs.o
|
module_DATA = module.o
|
||||||
|
|
||||||
$(module_DATA): $(stpdfs_module_SOURCES)
|
$(module_DATA): $(stpdfs_module_SOURCES)
|
||||||
mv Makefile Makefile.automake
|
mv Makefile Makefile.automake
|
||||||
cp $(srcdir)/../Makefile.kernel Makefile
|
cp $(srcdir)/../Makefile.kernel Makefile
|
||||||
CPPFLAGS="" CFLAGS="" LDFLAGS="" \
|
CPPFLAGS="" CFLAGS="" LDFLAGS="" \
|
||||||
$(MAKE) -C /lib/modules/$(shell uname -r)/build \
|
$(MAKE) -C /lib/modules/$(shell uname -r)/build \
|
||||||
ARCH="x86" CC="gcc" M=$(PWD) modules\
|
ARCH="x86" CC="gcc" M=$(PWD) modules\
|
||||||
KBUILD_VERBOSE=$(KBUILD_VERBOSE)
|
KBUILD_VERBOSE=$(KBUILD_VERBOSE)
|
||||||
mv Makefile.automake Makefile
|
mv Makefile.automake Makefile
|
||||||
|
|
||||||
CLEANFILES = $(module_DATA) .$(module_DATA).flags $(module_DATA:.o=.mod.c) $(module_DATA:.o=.@kernelext@)
|
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>
|
* \addtogroup driver
|
||||||
|
* @{
|
||||||
static int __init
|
*/
|
||||||
stpdfs_mod_init(void)
|
#include <linux/init.h>
|
||||||
{
|
#include <linux/module.h>
|
||||||
printk("Hello, world!\n");
|
|
||||||
return 0;
|
/**
|
||||||
}
|
* \defgroup linux Linux Kernel Module
|
||||||
|
* @{
|
||||||
module_init(stpdfs_mod_init);
|
*/
|
||||||
|
|
||||||
static void __exit
|
static int __init
|
||||||
stpdfs_mod_exit(void)
|
stpdfs_mod_init(void)
|
||||||
{
|
{
|
||||||
printk("Goodbye, world!\n");
|
printk("Hello, world!\n");
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
module_exit(stpdfs_mod_exit);
|
|
||||||
|
module_init(stpdfs_mod_init);
|
||||||
MODULE_LICENSE("BSD3");
|
|
||||||
MODULE_AUTHOR("d0p1");
|
static void __exit
|
||||||
MODULE_DESCRIPTION("Stupid File System");
|
stpdfs_mod_exit(void)
|
||||||
MODULE_VERSION("1.0");
|
{
|
||||||
|
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>
|
* \addtogroup driver
|
||||||
|
* @{
|
||||||
DRIVER_INITIALIZE DriverEntry;
|
*/
|
||||||
|
#include <ntddk.h>
|
||||||
PDEVICE_OBJECT StpdDiskFileSystemDeviceObject;
|
#include <wdf.h>
|
||||||
|
|
||||||
VOID
|
/**
|
||||||
StpdUnload(_In_ PDRIVER_OBJECT DriverObject)
|
* \defgroup win32 Windows Driver
|
||||||
{
|
* @{
|
||||||
UNREFERENCED_PARAMETER(DriverObject);
|
*/
|
||||||
|
|
||||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: Driver unload\n"));
|
DRIVER_INITIALIZE DriverEntry;
|
||||||
}
|
|
||||||
|
PDEVICE_OBJECT StpdDiskFileSystemDeviceObject;
|
||||||
NTSTATUS
|
|
||||||
DriverEntry(
|
VOID
|
||||||
_In_ PDRIVER_OBJECT DriverObject,
|
StpdUnload(_In_ PDRIVER_OBJECT DriverObject)
|
||||||
_In_ PUNICODE_STRING RegistryPath
|
{
|
||||||
)
|
UNREFERENCED_PARAMETER(DriverObject);
|
||||||
{
|
|
||||||
UNICODE_STRING ustr;
|
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: Driver unload\n"));
|
||||||
NTSTATUS status;
|
}
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(RegistryPath);
|
NTSTATUS
|
||||||
|
DriverEntry(
|
||||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: DriverEntry\n"));
|
_In_ PDRIVER_OBJECT DriverObject,
|
||||||
|
_In_ PUNICODE_STRING RegistryPath
|
||||||
RtlInitUnicodeString(&ustr, L"\\Stpd");
|
)
|
||||||
status = IoCreateDevice(DriverObject, 0, &ustr,
|
{
|
||||||
FILE_DEVICE_DISK_FILE_SYSTEM, 0, FALSE,
|
UNICODE_STRING ustr;
|
||||||
&StpdDiskFileSystemDeviceObject);
|
NTSTATUS status;
|
||||||
|
|
||||||
if (!NT_SUCCESS(status))
|
UNREFERENCED_PARAMETER(RegistryPath);
|
||||||
{
|
|
||||||
return status;
|
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "StupidFS: DriverEntry\n"));
|
||||||
}
|
|
||||||
#pragma prefast(push)
|
RtlInitUnicodeString(&ustr, L"\\Stpd");
|
||||||
#pragma prefast(disable:28155, "these are all correct")
|
status = IoCreateDevice(DriverObject, 0, &ustr,
|
||||||
#pragma prefast(disable:28169, "these are all correct")
|
FILE_DEVICE_DISK_FILE_SYSTEM, 0, FALSE,
|
||||||
#pragma prefast(disable:28175, "this is a filesystem, touching FastIoDispatch is allowed")
|
&StpdDiskFileSystemDeviceObject);
|
||||||
DriverObject->DriverUnload = StpdUnload;
|
|
||||||
#pragma prefast(pop)
|
if (!NT_SUCCESS(status))
|
||||||
return 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