EmbLogic's Blog

Character Driver(Writing data in the 1 quantum)

#here i write in the 1 quantum of the scull and by this i am able to write in the kernel layer....
RCS file: application.c,v
Working file: application.c
head: 1.7
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 7;	selected revisions: 7
description:
make the open call.
----------------------------
revision 1.7
date: 2014/05/18 09:45:03;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.6
date: 2014/05/18 09:10:37;  author: root;  state: Exp;  lines: +8 -8
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/18 04:26:31;  author: root;  state: Exp;  lines: +8 -7
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/13 15:18:27;  author: root;  state: Exp;  lines: +1 -0
include the string.h
----------------------------
revision 1.3
date: 2014/05/13 15:17:20;  author: root;  state: Exp;  lines: +5 -1
use the write system call.
----------------------------
revision 1.2
date: 2014/05/08 06:06:12;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/08 06:05:16;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;	selected revisions: 4
description:
declare the extern variable as dev, nod, minorno and majorno.
----------------------------
revision 1.4
date: 2014/05/07 03:36:11;  author: root;  state: Exp;  lines: +5 -0
define extern for new_dev quantum_size qset_size data_size and device_size
----------------------------
revision 1.3
date: 2014/05/06 06:25:08;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/06 03:29:21;  author: root;  state: Exp;  lines: +6 -0
declare a structure SkullDev with a structure cdev define in cdev,h
----------------------------
revision 1.1
date: 2014/05/06 02:07:46;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devrelease.c,v
Working file: devrelease.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
----------------------------
revision 1.1
date: 2014/05/08 04:56:14;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.16
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 16;	selected revisions: 16
description:
including the linux/modules.
includding the linux/init.
define GPL.
----------------------------
revision 1.16
date: 2014/05/18 04:25:51;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.15
date: 2014/05/15 10:20:14;  author: root;  state: Exp;  lines: +1 -0
include asm-generic uaccess.h header file for the copy_to_user.
----------------------------
revision 1.14
date: 2014/05/13 13:27:30;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
----------------------------
revision 1.13
date: 2014/05/11 14:39:30;  author: root;  state: Exp;  lines: +4 -0
make the macro for the header because its included multiple times in the program.....and we have to use __header as macro otherwise it leads to a error.
----------------------------
revision 1.12
date: 2014/05/07 03:41:07;  author: root;  state: Exp;  lines: +4 -4
define MACROS
----------------------------
revision 1.11
date: 2014/05/07 03:31:31;  author: root;  state: Exp;  lines: +27 -1
define macro for QSET_SIZE, QUANTUM_SIZE, DATA_SIZE and DEVICE_SIZE.
define structure ScullQset.
----------------------------
revision 1.10
date: 2014/05/06 07:17:41;  author: root;  state: Exp;  lines: +2 -1
include the moduleparam.h for the module_param i.e. passing the arguments in the kernel layer.
----------------------------
revision 1.9
date: 2014/05/06 06:36:59;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.8
date: 2014/05/06 06:33:38;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.7
date: 2014/05/06 06:31:04;  author: root;  state: Exp;  lines: +2 -0
include slab.h for the kmalloc and kdev_t for the Macros MINOR and MAJOR.
----------------------------
revision 1.6
date: 2014/05/06 06:26:43;  author: root;  state: Exp;  lines: +1 -0
include cdev.h header file for struct cdev
----------------------------
revision 1.5
date: 2014/05/06 06:24:27;  author: root;  state: Exp;  lines: +4 -0
declare the struct SkullDev in header instead of in declaration.h.
----------------------------
revision 1.4
date: 2014/05/06 02:12:04;  author: root;  state: Exp;  lines: +4 -4
redfine the macro in header file again.
----------------------------
revision 1.3
date: 2014/05/06 02:03:21;  author: root;  state: Exp;  lines: +17 -0
include the linux/fs.h
difine the macros DEVNAME N
----------------------------
revision 1.2
date: 2014/05/06 01:04:44;  author: root;  state: Exp;  lines: +1 -1
correct the license GPL
----------------------------
revision 1.1
date: 2014/05/06 00:58:23;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;	selected revisions: 6
description:
use the module_exit(exitfn) and define the declaration of exitfn
----------------------------
revision 1.6
date: 2014/05/06 03:28:56;  author: root;  state: Exp;  lines: +1 -0
kfree the memory allocated during kmalloc.
----------------------------
revision 1.5
date: 2014/05/06 02:35:09;  author: root;  state: Exp;  lines: +2 -1
include the declaration.h in this.
----------------------------
revision 1.4
date: 2014/05/06 02:32:49;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.3
date: 2014/05/06 02:30:41;  author: root;  state: Exp;  lines: +1 -1
the function name we use as __
----------------------------
revision 1.2
date: 2014/05/06 02:06:30;  author: root;  state: Exp;  lines: +3 -1
call unregister_chrdev_region for the unregistration.
----------------------------
revision 1.1
date: 2014/05/06 01:00:24;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;	selected revisions: 4
description:
write the defination of the devopen
----------------------------
revision 1.4
date: 2014/05/13 14:35:37;  author: root;  state: Exp;  lines: +22 -0
call the trim function.
write the defination of the trim function.
----------------------------
revision 1.3
date: 2014/05/11 15:53:59;  author: root;  state: Exp;  lines: +3 -2
include declaration.h
----------------------------
revision 1.2
date: 2014/05/11 15:26:48;  author: root;  state: Exp;  lines: +12 -0
introduce container of  which is used to point out the memory of external device.
----------------------------
revision 1.1
date: 2014/05/08 04:56:14;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.12
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 12;	selected revisions: 12
description:
write the devwrite function.
map the devwrite function.
----------------------------
revision 1.12
date: 2014/05/18 09:42:30;  author: root;  state: Exp;  lines: +1 -1
return the size-ret to the write system call of the application layer i.e application.c program.
----------------------------
revision 1.11
date: 2014/05/18 09:16:13;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.10
date: 2014/05/18 05:28:36;  author: root;  state: Exp;  lines: +7 -7
make the scullqset_creat qset_create and quantum_creat
make the 1 quantum for the world emblogic.
and make the 1 scullqset for the world emblogic
----------------------------
revision 1.9
date: 2014/05/18 04:26:34;  author: root;  state: Exp;  lines: +31 -15
*** empty log message ***
----------------------------
revision 1.8
date: 2014/05/15 14:20:59;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.7
date: 2014/05/15 11:56:09;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.6
date: 2014/05/15 11:53:16;  author: root;  state: Exp;  lines: +6 -0
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/15 11:37:23;  author: root;  state: Exp;  lines: +7 -5
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/15 10:21:47;  author: root;  state: Exp;  lines: +28 -20
write the defination for the create_scullqset, create_qset, and create_quantum.
----------------------------
revision 1.3
date: 2014/05/13 17:03:30;  author: root;  state: Exp;  lines: +73 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/13 15:12:20;  author: root;  state: Exp;  lines: +4 -1
give the defination of devwrite()
----------------------------
revision 1.1
date: 2014/05/13 15:07:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.31
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 31;	selected revisions: 31
description:
use the module_init(initfn) and define the declaration of initfn
----------------------------
revision 1.31
date: 2014/05/18 04:26:28;  author: root;  state: Exp;  lines: +9 -0
*** empty log message ***
----------------------------
revision 1.30
date: 2014/05/13 13:27:32;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.29
date: 2014/05/08 03:47:42;  author: root;  state: Exp;  lines: +4 -4
*** empty log message ***
----------------------------
revision 1.28
date: 2014/05/08 03:31:38;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.27
date: 2014/05/08 03:30:27;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.26
date: 2014/05/08 03:28:42;  author: root;  state: Exp;  lines: +4 -2
*** empty log message ***
----------------------------
revision 1.25
date: 2014/05/08 03:20:39;  author: root;  state: Exp;  lines: +2 -1
*** empty log message ***
----------------------------
revision 1.24
date: 2014/05/08 03:15:11;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.23
date: 2014/05/08 03:05:46;  author: root;  state: Exp;  lines: +3 -3
*** empty log message ***
----------------------------
revision 1.22
date: 2014/05/08 03:00:33;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.21
date: 2014/05/08 02:59:54;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
----------------------------
revision 1.20
date: 2014/05/08 02:13:15;  author: root;  state: Exp;  lines: +4 -3
replace by [] and -> by .
----------------------------
revision 1.19
date: 2014/05/08 02:06:31;  author: root;  state: Exp;  lines: +11 -7
print the major and minor number for all nodes.
----------------------------
revision 1.18
date: 2014/05/07 03:41:18;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.17
date: 2014/05/07 03:34:19;  author: root;  state: Exp;  lines: +29 -8
call MKDEV
call cdev_add
----------------------------
revision 1.16
date: 2014/05/06 07:34:43;  author: root;  state: Exp;  lines: +2 -1
*** empty log message ***
----------------------------
revision 1.15
date: 2014/05/06 07:32:45;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
----------------------------
revision 1.14
date: 2014/05/06 07:23:46;  author: root;  state: Exp;  lines: +2 -2
define the module_param above the init_func
----------------------------
revision 1.13
date: 2014/05/06 07:18:42;  author: root;  state: Exp;  lines: +2 -0
define module_param call
----------------------------
revision 1.12
date: 2014/05/06 06:44:23;  author: root;  state: Exp;  lines: +2 -1
initilize the struct ScullDev above the function name
----------------------------
revision 1.11
date: 2014/05/06 06:24:59;  author: root;  state: Exp;  lines: +5 -5
*** empty log message ***
----------------------------
revision 1.10
date: 2014/05/06 03:34:40;  author: root;  state: Exp;  lines: +5 -5
*** empty log message ***
----------------------------
revision 1.9
date: 2014/05/06 03:31:46;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.8
date: 2014/05/06 03:26:36;  author: root;  state: Exp;  lines: +9 -0
call kmalloc and allocate the space uptp the structure SkullDev.
SkullDev is used to map the memory of the Device Driver.
defint the *skulldev which is extern and define in the struct SkullDev
----------------------------
revision 1.7
date: 2014/05/06 02:55:59;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.6
date: 2014/05/06 02:31:58;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/06 02:30:20;  author: root;  state: Exp;  lines: +2 -2
the fuction name we use __
----------------------------
revision 1.4
date: 2014/05/06 02:24:27;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
----------------------------
revision 1.3
date: 2014/05/06 02:17:40;  author: root;  state: Exp;  lines: +5 -2
initialize the extern variable to MACRO within the function itself
----------------------------
revision 1.2
date: 2014/05/06 02:05:12;  author: root;  state: Exp;  lines: +21 -1
call alloc chr_dev region to register the DD into kernel and then call MAJOR and MINOR to display ita majorno and mno.
----------------------------
revision 1.1
date: 2014/05/06 00:59:15;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;	selected revisions: 6
description:
mention the prototype of devopen and devrelease
----------------------------
revision 1.6
date: 2014/05/15 11:37:21;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/15 10:20:55;  author: root;  state: Exp;  lines: +3 -5
write the prototype fot the create_scullqset, create_qset, create_quantun.
----------------------------
revision 1.4
date: 2014/05/13 17:03:23;  author: root;  state: Exp;  lines: +4 -0
*** empty log message ***
----------------------------
revision 1.3
date: 2014/05/13 15:11:44;  author: root;  state: Exp;  lines: +1 -0
write the prototype of the devwrite()
----------------------------
revision 1.2
date: 2014/05/13 14:34:33;  author: root;  state: Exp;  lines: +1 -0
give the prototype of trim function used in the devopen and this trim function is used to flush the data, when its open in WR mode.
----------------------------
revision 1.1
date: 2014/05/08 04:56:14;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: fileopr.h,v
Working file: fileopr.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is the mapping of the open close and write system call from the application layer to the kernel system call...
----------------------------
revision 1.1
date: 2014/05/18 09:50:00;  author: root;  state: Exp;
Initial revision
=============================================================================

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>