Commit 361b8d9b authored by root's avatar root
Browse files

extractmd branch

parent d5c8a900
cmd_/home/user/extractmd/extractmd.ko := ld -r -m elf_x86_64 -T ./scripts/module-common.lds --build-id -o /home/user/extractmd/extractmd.ko /home/user/extractmd/extractmd.o /home/user/extractmd/extractmd.mod.o
cmd_/home/user/Team_Safdar/extractmd/extractmd.ko := ld -r -m elf_x86_64 -T ./scripts/module-common.lds --build-id -o /home/user/Team_Safdar/extractmd/extractmd.ko /home/user/Team_Safdar/extractmd/extractmd.o /home/user/Team_Safdar/extractmd/extractmd.mod.o
cmd_/home/user/extractmd/extractmd.mod.o := gcc -Wp,-MD,/home/user/extractmd/.extractmd.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(extractmd.mod)" -D"KBUILD_MODNAME=KBUILD_STR(extractmd)" -DMODULE -c -o /home/user/extractmd/extractmd.mod.o /home/user/extractmd/extractmd.mod.c
cmd_/home/user/Team_Safdar/extractmd/extractmd.mod.o := gcc -Wp,-MD,/home/user/Team_Safdar/extractmd/.extractmd.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(extractmd.mod)" -D"KBUILD_MODNAME=KBUILD_STR(extractmd)" -DMODULE -c -o /home/user/Team_Safdar/extractmd/extractmd.mod.o /home/user/Team_Safdar/extractmd/extractmd.mod.c
source_/home/user/extractmd/extractmd.mod.o := /home/user/extractmd/extractmd.mod.c
source_/home/user/Team_Safdar/extractmd/extractmd.mod.o := /home/user/Team_Safdar/extractmd/extractmd.mod.c
deps_/home/user/extractmd/extractmd.mod.o := \
deps_/home/user/Team_Safdar/extractmd/extractmd.mod.o := \
$(wildcard include/config/module/unload.h) \
include/linux/module.h \
$(wildcard include/config/sysfs.h) \
......@@ -568,6 +568,6 @@ deps_/home/user/extractmd/extractmd.mod.o := \
include/linux/vermagic.h \
include/generated/utsrelease.h \
/home/user/extractmd/extractmd.mod.o: $(deps_/home/user/extractmd/extractmd.mod.o)
/home/user/Team_Safdar/extractmd/extractmd.mod.o: $(deps_/home/user/Team_Safdar/extractmd/extractmd.mod.o)
$(deps_/home/user/extractmd/extractmd.mod.o):
$(deps_/home/user/Team_Safdar/extractmd/extractmd.mod.o):
cmd_/home/user/extractmd/extractmd.o := gcc -Wp,-MD,/home/user/extractmd/.extractmd.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -DMODULE -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(extractmd)" -D"KBUILD_MODNAME=KBUILD_STR(extractmd)" -c -o /home/user/extractmd/extractmd.o /home/user/extractmd/extractmd.c
cmd_/home/user/Team_Safdar/extractmd/extractmd.o := gcc -Wp,-MD,/home/user/Team_Safdar/extractmd/.extractmd.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -DMODULE -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(extractmd)" -D"KBUILD_MODNAME=KBUILD_STR(extractmd)" -c -o /home/user/Team_Safdar/extractmd/extractmd.o /home/user/Team_Safdar/extractmd/extractmd.c
source_/home/user/extractmd/extractmd.o := /home/user/extractmd/extractmd.c
source_/home/user/Team_Safdar/extractmd/extractmd.o := /home/user/Team_Safdar/extractmd/extractmd.c
deps_/home/user/extractmd/extractmd.o := \
deps_/home/user/Team_Safdar/extractmd/extractmd.o := \
include/linux/module.h \
$(wildcard include/config/sysfs.h) \
$(wildcard include/config/modules.h) \
......@@ -631,7 +631,7 @@ deps_/home/user/extractmd/extractmd.o := \
$(wildcard include/config/amd/iommu.h) \
include/linux/pm_wakeup.h \
include/linux/mount.h \
/home/user/extractmd/linux-4.0.9/fs/ext4/ext4.h \
/home/user/Team_Safdar/extractmd/linux-4.0.9/fs/ext4/ext4.h \
include/linux/blkdev.h \
$(wildcard include/config/blk/dev/io/trace.h) \
$(wildcard include/config/blk/dev/bsg.h) \
......@@ -889,8 +889,8 @@ deps_/home/user/extractmd/extractmd.o := \
include/uapi/linux/aio_abi.h \
arch/x86/include/asm/compat.h \
arch/x86/include/asm/user32.h \
/home/user/extractmd/linux-4.0.9/fs/ext4/extents_status.h \
/home/user/Team_Safdar/extractmd/linux-4.0.9/fs/ext4/extents_status.h \
/home/user/extractmd/extractmd.o: $(deps_/home/user/extractmd/extractmd.o)
/home/user/Team_Safdar/extractmd/extractmd.o: $(deps_/home/user/Team_Safdar/extractmd/extractmd.o)
$(deps_/home/user/extractmd/extractmd.o):
$(deps_/home/user/Team_Safdar/extractmd/extractmd.o):
/home/user/extractmd/extractmd.ko
/home/user/extractmd/extractmd.o
/home/user/Team_Safdar/extractmd/extractmd.ko
/home/user/Team_Safdar/extractmd/extractmd.o
......@@ -23,6 +23,7 @@ static int copy_super_block(struct ext4_super_block *, struct ext4_super_block *
#define DEVICE_NAME "extractmd" /* Dev name as it appears in /proc/devices */
#define MAJOR 199 /* Device major number */
/* Global variables are declared as static, so are global within the file.*/
static struct class *my_class;
......@@ -38,8 +39,8 @@ static int __init init_extractmd(void)
printk(KERN_INFO "extractmd is registered in /proc/devices\n");
printk(KERN_INFO "/dev/extractmd is maked.\n");
printk(KERN_INFO "create class\n");
register_chrdev(199, DEVICE_NAME, &fops);
devt = MKDEV(199,0);
register_chrdev(MAJOR, DEVICE_NAME, &fops);
devt = MKDEV(MAJOR,0);
my_class = class_create(THIS_MODULE, DEVICE_NAME);
device_create(my_class, NULL, devt, NULL, DEVICE_NAME);
......@@ -49,7 +50,7 @@ static int __init init_extractmd(void)
static void __exit cleanup_extractmd(void)
{
/* Unregister the device */
unregister_chrdev(199, DEVICE_NAME);
unregister_chrdev(MAJOR, DEVICE_NAME);
device_destroy(my_class, devt);
class_destroy(my_class);
printk(KERN_INFO "unregister extractmd, destroy dev node and class\n");
......@@ -145,4 +146,4 @@ static int copy_super_block(struct ext4_super_block *dst, struct ext4_super_bloc
module_init(init_extractmd);
module_exit(cleanup_extractmd);
MODULE_LICENSE("GPL");
\ No newline at end of file
MODULE_LICENSE("GPL");
kernel//home/user/extractmd/extractmd.ko
kernel//home/user/Team_Safdar/extractmd/extractmd.ko
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment