Skip to content

Instantly share code, notes, and snippets.

View SysMan-One's full-sized avatar
💭
Ready for any project on C!

Ruslan R. Laishev SysMan-One

💭
Ready for any project on C!
View GitHub Profile
#define __MODULE__ "DHEXMPL"
#define __IDENT__ "X.00-01"
#ifdef __GNUC__
#ident __IDENT__
#endif
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
#pragma GCC diagnostic ignored "-Wmissing-braces"
@SysMan-One
SysMan-One / bagent-cb.c
Created June 26, 2019 11:12
A template for the callback function. Don't forget to include <stdarg.h>
/*
** DESCRIPTION: A template for the callback function. Don't forget to include <stdarg.h>
**
** INPUT:
** ctx: a callback context argument has been passed into the bagent_init()
** what: see BP$K_* constants:
** sd: is an optional argument is passed if what==BP$K_PROTSD
**
** OUTPUT:
** NONE
@SysMan-One
SysMan-One / filter.c
Created July 21, 2018 08:53 — forked from prashants/filter.c
Filter driver
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/cdev.h>
#include <linux/kthread.h>
#include <linux/interrupt.h>
#include <linux/bio.h>
#include <linux/blkdev.h>
@SysMan-One
SysMan-One / Makefile
Created December 22, 2017 08:10 — forked from anonymous/Makefile
EXTRA_CFLAGS += -D_GNU_SOURCE
obj-m := vraid.o
all:
make -C /usr/src/linux-headers-$(shell uname -r) SUBDIRS=$(PWD) modules
clean:
make -C /usr/src/linux-headers-$(shell uname -r) SUBDIRS=$(PWD) clean