EmbLogic's Blog

Character Driver(SEEK_SET seeking operation in the reader).

#implementing the lseek(SEEK_SET) operation in the kernel layer then read the written bytes from the application layer, without closing the fd

RCS file: application.c,v
Working file: application.c
head: 1.16
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 16;	selected revisions: 16
description:
this is the application program in the user space
open write and close is used
----------------------------
revision 1.16
date: 2014/05/30 07:19:57;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.15
date: 2014/05/30 07:09:07;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
----------------------------
revision 1.14
date: 2014/05/29 06:06:43;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.13
date: 2014/05/29 06:05:10;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.12
date: 2014/05/29 05:44:00;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.11
date: 2014/05/29 05:43:01;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.10
date: 2014/05/29 05:38:44;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.9
date: 2014/05/29 05:37:02;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
----------------------------
revision 1.8
date: 2014/05/26 11:19:01;  author: root;  state: Exp;  lines: +2 -2
seeking operation applied
apply SEEK_SET. and call lseek in application layer
----------------------------
revision 1.7
date: 2014/05/26 06:00:53;  author: root;  state: Exp;  lines: +10 -4
not open the node in RDWR mode because the node either open in the WR mode or in RD mode because its tbecause if we make it fullduplex then data get mingle.
----------------------------
revision 1.6
date: 2014/05/25 11:29:25;  author: root;  state: Exp;  lines: +11 -7
open the file in the O_RDWR mode then its capable to read and write from the files.
----------------------------
revision 1.5
date: 2014/05/24 11:49:01;  author: root;  state: Exp;  lines: +9 -9
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 11:35:56;  author: root;  state: Exp;  lines: +12 -12
close the fd for the writing then open it again in the read mode.
----------------------------
revision 1.3
date: 2014/05/24 09:07:54;  author: root;  state: Exp;  lines: +16 -2
close the fd for the write operation(important to close the fd otherwise use lseek)
then open in the read mode then read while using its file descriptor.
----------------------------
revision 1.2
date: 2014/05/24 07:49:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devlseek.c,v
Working file: devlseek.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
----------------------------
revision 1.2
date: 2014/05/30 07:09:37;  author: root;  state: Exp;  lines: +4 -2
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/25 11:30:12;  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:
for closeing the module
----------------------------
revision 1.1
date: 2014/05/24 07:16:45;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: fileopr.h,v
Working file: fileopr.h
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
used for the mapping purpose.
----------------------------
revision 1.3
date: 2014/05/25 11:30:20;  author: root;  state: Exp;  lines: +2 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:09:56;  author: root;  state: Exp;  lines: +2 -1
do the mapping of read
----------------------------
revision 1.1
date: 2014/05/24 07:18:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to remove and unregistered the module from the /proc/devices table.
----------------------------
revision 1.1
date: 2014/05/24 07:13:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
open the module in the kernel layer by passing the argument from the application layer of the open system call.
here we are not using the trim funciton.
----------------------------
revision 1.1
date: 2014/05/24 07:15:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
used to write in the multiple quantum
multiple qset
then use copy_from_user.
very important file and hard too.
----------------------------
revision 1.3
date: 2014/05/25 09:31:31;  author: root;  state: Exp;  lines: +11 -4
use the loff and filep->f_pos to see the position of the pointer.
this loff and filep->f_pos could not be updated automatically so we make the updation.
----------------------------
revision 1.2
date: 2014/05/24 07:47:23;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:56;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define macros and include header file in this and make a ScullDev and ScullQset structure in this.
----------------------------
revision 1.1
date: 2014/05/24 07:11:00;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
declare the prototype.
----------------------------
revision 1.3
date: 2014/05/25 11:29:17;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:07:02;  author: root;  state: Exp;  lines: +2 -0
mention the prototype of the read call which is is fs.h header file and is in the struct file_operations {
----------------------------
revision 1.1
date: 2014/05/24 07:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define some macros which are freq	uently used in our program.
----------------------------
revision 1.1
date: 2014/05/24 07:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devread.c,v
Working file: devread.c
head: 1.10
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 10;	selected revisions: 10
description:
write the fuction for the read which is work in the kernel layer.
----------------------------
revision 1.10
date: 2014/05/30 07:09:09;  author: root;  state: Exp;  lines: +13 -8
implement the SEEK_SET again.
and it work file
----------------------------
revision 1.9
date: 2014/05/26 11:19:45;  author: root;  state: Exp;  lines: +28 -9
draw logic for the seek operation.
----------------------------
revision 1.8
date: 2014/05/24 11:40:26;  author: root;  state: Exp;  lines: +9 -5
give the defination for the read function.
----------------------------
revision 1.7
date: 2014/05/24 10:34:09;  author: root;  state: Exp;  lines: +7 -2
*** empty log message ***
----------------------------
revision 1.6
date: 2014/05/24 09:28:15;  author: root;  state: Exp;  lines: +5 -5
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/24 09:26:24;  author: root;  state: Exp;  lines: +7 -7
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 09:21:09;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.3
date: 2014/05/24 09:19:17;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:16:07;  author: root;  state: Exp;  lines: +1 -0
make a access to the private data to the sculldev
----------------------------
revision 1.1
date: 2014/05/24 09:09:26;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to insert the module the register the module.
in this i dont use trim function.
----------------------------
revision 1.1
date: 2014/05/24 07:12:20;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Uncategorized | Leave a comment

message queue

Two (or more) processes can exchange information via access to a common system message queue. The sending process places via some (OS) message-passing module a message onto a queue which can be read by another process . Each message is given an identification or type so that processes can select the appropriate message. Process must share a common key in order to gain access to the queue in the first place .

Basic Message Passing IPC messaging lets processes send and receive messages, and queue messages for processing in an arbitrary order. Unlike the file byte-stream data flow of pipes, each IPC message has an explicit length. Messages can be assigned a specific type. Because of this, a server process can direct message traffic between clients on its queue by using the client process PID as the message type. For single-message transactions, multiple server processes can work in parallel on transactions sent to a shared message queue.

Before a process can send or receive a message, the queue must be initialized (through the msgget function see below) Operations to send and receive messages are performed by the msgsnd() and msgrcv() functions, respectively.

When a message is sent, its text is copied to the message queue. The msgsnd() and msgrcv() functions can be performed as either blocking or non-blocking operations. Non-blocking operations allow for asynchronous message transfer — the process is not suspended as a result of sending or receiving a message. In blocking or synchronous message passing the sending process cannot continue until the message has been transferred or has even been acknowledged by a receiver. IPC signal and other mechanisms can be employed to implement such transfer. A blocked message operation remains suspended until one of the following three conditions occurs:

The call succeeds.
The process receives a signal.
The queue is removed.

Posted in Uncategorized | Leave a comment

LSEEK() system call



The lseek() function repositions the offset of the file descriptor fildes to the argument offset according to the directive whence.
The argument fildes must be an open file descriptor. 
Lseek() repositions the file position pointer associated with the file descriptor fildes as follows:
  • If whence is SEEK_SET, the offset is set to offset bytes.
  • If whence is SEEK_CUR, the offset is set to its current location plus offset bytes.
  • If whence is SEEK_END, the offset is set to the size of the file plus offset bytes.
The lseek() function allows the file offset to be set beyond the end of the existing end-of-file of the file.
If data is later written at this point, subsequent reads of the data in the gap return bytes of zeros (until data is actually written into the gap).

Some devices are incapable of seeking. The value of the pointer   associated with such a device is undefined.
Upon successful completion, lseek() returns the resulting offset location as measured in bytes from the beginning of the file.Otherwise, a value of -1 is returned and errno is set to indicate the error.
Posted in Data Structures with C | Leave a comment

character driver-seek_SET,SEEK_CUR and SEEK_END working fine for reading

RCS file: ./read2.c,v
Working file: ./read2.c
head: 1.40
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 40; selected revisions: 40
description:
this is working fine with lseek
—————————-
revision 1.40
date: 2014/05/27 17:52:40; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.39
date: 2014/05/27 17:27:03; author: root; state: Exp; lines: +1 -1
successfully working for seek_set,seek_cur,seek_end
—————————-
revision 1.38
date: 2014/05/27 17:23:05; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.37
date: 2014/05/27 17:21:07; author: root; state: Exp; lines: +1 -3
*** empty log message ***
—————————-
revision 1.36
date: 2014/05/27 17:07:02; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.35
date: 2014/05/27 17:05:21; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.34
date: 2014/05/27 17:02:47; author: root; state: Exp; lines: +1 -0
if(qpos) then lnoq=lnoq+qpos
—————————-
revision 1.33
date: 2014/05/27 16:56:01; author: root; state: Exp; lines: +4 -2
applied condition for the quantum=3 for(lv=qpos;lvf_pos
—————————-
revision 1.2
date: 2014/05/26 05:52:28; author: root; state: Exp; lines: +2 -2
changing the condition in for loop
—————————-
revision 1.1
date: 2014/05/26 05:27:55; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Character Driver | Leave a comment

Character driver -lseek operation

ranch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 19; selected revisions: 19
description:
this is working fine with lseek
—————————-
revision 1.19
date: 2014/05/26 18:30:46; author: root; state: Exp; lines: +1 -0
working successfully for read operation using lseek
—————————-
revision 1.18
date: 2014/05/26 17:57:00; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.17
date: 2014/05/26 17:53:58; author: root; state: Exp; lines: +3 -3
*off+=nocsr;
—————————-
revision 1.16
date: 2014/05/26 17:48:06; author: root; state: Exp; lines: +4 -4
changing position of the logic earlier
—————————-
revision 1.15
date: 2014/05/26 17:44:53; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.14
date: 2014/05/26 17:43:03; author: root; state: Exp; lines: +2 -2
rearranging the previous condition
—————————-
revision 1.13
date: 2014/05/26 17:40:15; author: root; state: Exp; lines: +8 -2
condition if offset is greater than the data_size
—————————-

Posted in Character Driver | Leave a comment

ZOMBIE PROCESSES

What is a Zombie Process ?

It’s a pretty much common question asked in most of the interviews related to Linux, and most of the time people got it confused with Orphan Process. But these two are totally different from each other. A Zombie Process is nearly the same thing which we see in lot of horror movies. Like the dead people which don’t have any life force left, Zombie processes are the dead processes sitting in the process table and doing nothing.

To explain this in much better way, “Zombie process or defunct process is a process that have completed the execution, have released all the resources (CPU, memory) but still had an entry in the process table.”

Reasons of Zombie Process:

Most of the time, the reason for existence of Zombie process is bad coding. Normally, when a child (subprocess) finishes it’s task and exits, then it’s parent is suppose to use the “wait” system call and get the status of the process. So, until the parent process don’t check for the child’s exit status, the process is a Zombie process, but it usually is very small duration. But if due to any reason (bad programming or a bug), the parent process didn’t check the status of the child and don’t call “wait”, the child process stays in the state of Zombie waiting for parent to check it’s status.

Finding Zombie processes:

To check whether you have any Zombie processes in your system, simply run linux command line utility “top”. It shows the number of zombie processes at the upper-right side of its output.

At the same time, you can use one more command to check that

# ps aux

All the processes which are having “z” in their Stat column are Zombie processes.

Killing a Zombie Process:

Well, before taking any decision of killing the Zombie process, you should wait, as it is possible that the parent process is intentionally leaving the process in a zombie state to ensure that future children that it may create will not receive the same pid. Or perhaps the parent is occupied, and will reap the child process momentarily.

If that didn’t happen then you can send a SIGCHLD signal to the parent process of zombie which will instruct parents to reap their zombie children.

# kill -s SIGCHLD <PPID>

Even if this don’t work, then the last option you will have is to kill the parent process. You can easily find out the parent’s process ID with this command:

# ps aux -eo ppid | grep <Zombie Process ID>
# kill -9 <PPID>

So when a Zombie process loses it’s parent process, it becomes orphan and adopted by “init”. Init periodically executes the wait system call to reap any zombies with init as parent.

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Device Drivers Inroduction

One of the purposes of an operating system is to hide the peculiarities of the system’s hardware devices from its users. For example the Virtual File System presents a uniform view of the mounted filesystems irrespective of the underlying physical devices. This chapter describes how the Linux kernel manages the physical devices in the system.

The CPU is not the only intelligent device in the system, every physical device has its own hardware controller. The keyboard, mouse and serial ports are controlled by a SuperIO chip, the IDE disks by an IDE controller, SCSI disks by a SCSI controller and so on. Each hardware controller has its own control and status registers (CSRs) and these differ between devices. The CSRs for an Adaptec 2940 SCSI controller are completely different from those of an NCR 810 SCSI controller. The CSRs are used to start and stop the device, to initialize it and to diagnose any problems with it. Instead of putting code to manage the hardware controllers into every application, the code is kept in the Linux kernel. The software that handles or manages a hardware controller is known as a device driver. The Linux kernel device drivers are, essentially, a shared library of privileged, memory resident, low level hardware handling routines. It is Linux’s device drivers that handle the peculiarities of the devices they are managing.

 

Linux supports three types of hardware devices: character, block and network. Character devices are read and written directly without buffering, for example the system’s serial ports /dev/cua0 and /dev/cua1. Block devices can only be written to and read from in multiples of the block size, typically 512 or 1024 bytes. Block devices are accessed via the buffer cache and may be randomly accessed, that is to say, any block can be read or written no matter where it is on the device. Block devices can be accessed via their device special file but more commonly they are accessed via the file system. Only a block device can support a mounted file system. Network devices are accessed via the BSD socket interface and the networking subsytems described in the section on networking.

There are many different device drivers in the Linux kernel (that is one of Linux’s strengths) but they all share some common attributes:

 

Kernel code
Device drivers are part of the kernel and, like other code within the kernel, if they go wrong they can seriously damage the system. A badly written driver may even crash the system, possibly corrupting file systems and losing data. 

Kernel interfaces
Device drivers provide a standard interface to the Linux kernel or to the appropriate subsystem. For example, the terminal driver provides a file I/O interface to the Linux kernel and a SCSI device driver provides a SCSI device interface to the SCSI subsystem which, in turn, provides both file I/O and buffer cache interfaces to the kernel. 

Kernel mechanisms and services
Device drivers make use of standard kernel services such as memory allocation, interrupt delivery and wait queues to operate. 

Loadable
Most of the Linux device drivers can be loaded on demand as kernel modules when they are needed and unloaded when they are no longer being used. This makes the kernel very adaptable and efficient with the system’s resources. 

Configurable
Linux device drivers can be built into the kernel. Which devices are built is configurable when the kernel is compiled. 

Dynamic
As the system boots and each device driver is initialized it looks for the hardware devices that it will control. If those devices do not exist (maybe are just not found), the device driver is simply redundant and causes no harm apart from occupying a little of the system’s memory.

 

Memory

Device drivers have to be careful when using memory. As they are part of the Linux kernel they cannot use virtual memory. Each time a device driver runs, maybe as an interrupt is received or as a bottom half or task queue handler is scheduled, the current process may change. The device driver cannot rely on a particular process running even if it is doing work on its behalf. Like the rest of the kernel, device drivers use data structures to keep track of the device they controll. The kernel would become unnecessarily large if these data structures were statically allocated, part of the device driver’s code. Most device drivers allocate kernel, non-paged, memory to hold their data.

Linux provides kernel memory allocation and deallocation routines and it is these that the device drivers use. Kernel memory is allocated in chunks that are powers of 2. For example 128 or 512 bytes, even if the device driver asks for less. The number of bytes that the device driver requests is rounded up to the next block size boundary. This makes kernel memory deallocation easier as the smaller free blocks can be recombined into bigger blocks.

It may be that Linux needs to do quite a lot of extra work when the kernel memory is requested. If the amount of free memory is low, physical pages may need to be discarded or written to the swap device. Normally, Linux would suspend the requestor, putting the process onto a wait queue until there is enough physical memory. Not all device drivers (or indeed Linux kernel code) may want this to happen and so the kernel memory allocation routines can be requested to fail if they cannot immediately allocate memory.

The device driver can also specify that it wants to DMA to and from the memory it allocates. It is the Linux kernel, not the device driver, however, that takes care of the details. This way it is the Linux kernel rather than the device driver decides what constitutes DMA’able memory for the system.

 

Interfacing Device Drivers with the Kernel

To ensure that access is always done in the correct manner, the Linux kernel must be able to interact with device drivers in standard ways. Each class of device driver, character, block and network, provides common interfaces that the kernel uses when requesting services from them. These common interfaces mean that the kernel can treat often very different devices and their device drivers absolutely the same. For example, SCSI and IDE disks behave very differently but the Linux kernel uses the same interface to both of them.

Linux is very dynamic, every time a Linux kernel boots it may encounter different physical devices and thus need different device drivers. Linux allows you to include device drivers at kernel build time via its configuration scripts. When these drivers are initialized at boot time they may not discover any hardware to control. Other drivers can be loaded as kernel modules when they are needed. To cope with this dynamic nature of device drivers, device drivers register themselves with the kernel as they are initialized. Linux maintains tables of registered device drivers as part of its interfaces with them. These tables include pointers to routines and information that supports the interface with the device class.

 

Character Devices

Figure: Character Devices

Character devices, the simplest of Linux’s devices, are accessed as files, applications use standard system calls to open them, read from them, write to them and close them exactly as if the device were a file. This is true even if the device is a modem being used by the PPP daemon to connect a Linux system onto a network. As a character device is initialized its device driver registers itself with the Linux kernel by adding an entry into the chrdevs vector of device_struct data structures. The device’s major device identifier (for example 4 for the tty device) is used as an index into this vector. The major device identifier for a device is fixed.

Each entry in the chrdevs vector, a device_struct data structure contains two elements: a pointer to the name of the registered device driver and a pointer to a block of file operations. This block of file operations is itself the addresses of routines within the character device driver, each of which handles specific file operations such as open, read, write and close. The contents of /proc/devices for character devices is taken from the chrdevs vector.

When a character special file representing a character device (for example /dev/cua0) is opened, the kernel must set things up so that the correct character device driver’s file operation routines will be called. Just like an ordinairy file or directory, each device special file is represented by a VFS inode . The VFS inode for a character special file, indeed for all device special files, contains both the major and minor identifiers for the device. This VFS inode was created by the underlying filesystem, for example EXT2, from information in the real filesystem when the device special file’s name was looked up.

Each VFS inode has associated with it a set of file operations and these are different depending on the filesystem object that the inode represents. Whenever a VFS inode representing a character special file is created, its file operations are set to the default character device operations.

This has only one file operation, the open file operation. When the character special file is opened by an application the generic open file operation uses the device’s major identifier as an index into the chrdevs vector to retrieve the file operations block for this particular device. It also sets up the file data structure describing this character special file, making its file operations pointer point to those of the device driver. Thereafter all of the applications file operations will be mapped to calls to the character devices set of file operations.

 

Block Devices

Posted in Uncategorized | Leave a comment

Data structures in C(assignment-1)

RCS file: ./1.c,v
Working file: ./1.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
printing “Hello Word” using printf
—————————-
revision 1.1
date: 2014/05/23 11:22:57;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./2.c,v
Working file: ./2.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
addition of n numbers is done successfully
:)
—————————-
revision 1.1
date: 2014/05/23 11:22:37;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./3.c,v
Working file: ./3.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
printing “Hello” using printf
it also prints “” along with Hello
—————————-
revision 1.3
date: 2014/05/23 11:22:21;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.2
date: 2014/05/22 08:04:43;  author: root;  state: Exp;  lines: +1 -0
printing a long text including \ and “”
—————————-
revision 1.1
date: 2014/05/22 08:03:43;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./4.c,v
Working file: ./4.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
input my full name using scanf
try to print my full name using printf()
—————————-
revision 1.1
date: 2014/05/22 08:26:08;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./5.3rd_variable_without_scanf.c,v
Working file: ./5.3rd_variable_without_scanf.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
swapping two values
using 3rd variable
without entering the values manually
—————————-
revision 1.1
date: 2014/05/23 11:23:21;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./5.3rd_vraible_using_scanf.c,v
Working file: ./5.3rd_vraible_using_scanf.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
entering the two values in a and b
—————————-
revision 1.2
date: 2014/05/22 08:40:55;  author: root;  state: Exp;  lines: +7 -0
swapping two values
using the 3rd variable
—————————-
revision 1.1
date: 2014/05/22 08:39:24;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./6.c,v
Working file: ./6.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
allow the user to enter the number
—————————-
revision 1.3
date: 2014/05/23 14:55:37;  author: root;  state: Exp;  lines: +2 -0
*** empty log message ***
—————————-
revision 1.2
date: 2014/05/23 14:54:21;  author: root;  state: Exp;  lines: +9 -2
reversing the number
is done successfully
—————————-
revision 1.1
date: 2014/05/23 14:33:34;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./8.c,v
Working file: ./8.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
printing the size of int
—————————-
revision 1.4    locked by: root;
date: 2014/05/22 10:03:18;  author: root;  state: Exp;  lines: +1 -0
printign the size of double
—————————-
revision 1.3
date: 2014/05/22 10:02:28;  author: root;  state: Exp;  lines: +1 -0
printing the size of float
—————————-
revision 1.2
date: 2014/05/22 10:01:25;  author: root;  state: Exp;  lines: +1 -0
printing the size of char
—————————-
revision 1.1
date: 2014/05/22 09:56:36;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./9.a.c,v
Working file: ./9.a.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
printing hello world on the shell
also printing that how many bytes are written by the printf()
—————————-
revision 1.1
date: 2014/05/23 11:22:00;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./9.b.c,v
Working file: ./9.b.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
printing hello world on the shell and also an integer
checking that how many bytes are written by printf()
—————————-
revision 1.1
date: 2014/05/23 11:25:10;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./9.c.c,v
Working file: ./9.c.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
using printf(printf()) in the program
and checking how many no of bytes are written
and in which pattern?
—————————-
revision 1.1
date: 2014/05/23 11:41:15;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./9.d.c,v
Working file: ./9.d.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
using different conditions in printf()
and checking that how many bits are written?
—————————-
revision 1.1
date: 2014/05/23 11:41:11;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./9.e.c,v
Working file: ./9.e.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
again using different variety in printf() statement
—————————-
revision 1.1
date: 2014/05/23 11:41:03;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./10.a.c,v
Working file: ./10.a.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
user enter an integer through scanf()
and printinf k which stores scanf()
—————————-
revision 1.1
date: 2014/05/23 11:45:12;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./10.b.c,v
Working file: ./10.b.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
when %d is used in printf() for a character
if user enter any integer value,
then it returns 1
otherwise 0 if user enter a character
—————————-
revision 1.1
date: 2014/05/23 11:56:23;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./10.c.c,v
Working file: ./10.c.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
user enter an integer and character
if integer and character are entered
in a right sequence
then it returns 1
if the sequence is altered,
then it will return 0.
—————————-
revision 1.1
date: 2014/05/23 12:01:10;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./10.d.c,v
Working file: ./10.d.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
user enter name character and an integer
lets c what does scanf return now
—————————-
revision 1.1
date: 2014/05/23 13:36:38;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./12.a.c,v
Working file: ./12.a.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
printing the hexa number in integer form
—————————-
revision 1.1    locked by: root;
date: 2014/05/23 12:37:43;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./12.b.c,v
Working file: ./12.b.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
printing the octa number in integer form
—————————-
revision 1.1
date: 2014/05/23 12:37:16;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./13.a.c,v
Working file: ./13.a.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
using if and else condition
if if(condition) sattisfied then it will print same
otherwise not same
—————————-
revision 1.1
date: 2014/05/23 13:00:22;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./13.b.c,v
Working file: ./13.b.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
using if and else condition
if if(condition) is true then it will print greater
otherwise less
—————————-
revision 1.1
date: 2014/05/23 13:02:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./13.c.c,v
Working file: ./13.c.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
using if and else condition
if if(condition) is true then it will print same
otherwise less
—————————-
revision 1.1
date: 2014/05/23 13:05:31;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./13.d.c,v
Working file: ./13.d.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
printing the float value for an integer
priting the integer value for float
—————————-
revision 1.1
date: 2014/05/23 13:12:16;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./13.e.c,v
Working file: ./13.e.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
giving more number of format specifiers than the numents
lets c what happen
—————————-
revision 1.1
date: 2014/05/23 13:34:31;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./15.c,v
Working file: ./15.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
ch=’1′ will print 1
and
ch=1 will print in the array format
—————————-
revision 1.1
date: 2014/05/23 13:40:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./16.c,v
Working file: ./16.c
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;    selected revisions: 5
description:
user enter 2 integers
—————————-
revision 1.5
date: 2014/05/23 13:52:48;  author: root;  state: Exp;  lines: +4 -1
now division is performed
—————————-
revision 1.4
date: 2014/05/23 13:48:27;  author: root;  state: Exp;  lines: +4 -1
performing the multiplication action now
on the numbers
which the user entered
—————————-
revision 1.3
date: 2014/05/23 13:46:54;  author: root;  state: Exp;  lines: +4 -1
performing the subtraction action now
on the numbers
which the user entered
—————————-
revision 1.2
date: 2014/05/23 13:45:30;  author: root;  state: Exp;  lines: +4 -2
addition is performed on both the numbers
which the user entered
—————————-
revision 1.1
date: 2014/05/23 13:44:32;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./17.c,v
Working file: ./17.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
user enter the character
checking whether the entered character is a vowel or not
—————————-
revision 1.1
date: 2014/05/23 13:58:27;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: ./fac.c,v
Working file: ./fac.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
user enter the number
—————————-
revision 1.2    locked by: root;
date: 2014/05/23 15:15:32;  author: root;  state: Exp;  lines: +6 -1
factorial of the number is calculated
successfully
:)
—————————-
revision 1.1
date: 2014/05/23 14:01:52;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Data Structures with C | Leave a comment

Factorial of a number is calculated

RCS file: ./fac.c,v
Working file: ./fac.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
user enter the number
—————————-
revision 1.2    locked by: root;
date: 2014/05/23 15:15:32;  author: root;  state: Exp;  lines: +6 -1
factorial of the number is calculated
successfully
:)
—————————-
revision 1.1
date: 2014/05/23 14:01:52;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Data Structures with C | Leave a comment

Character Driver(seek operation)

#implementing the lseek opereration in the kernel layer then read the writen bytes from the application layer, without closing the fd
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
=============================================================================

RCS file: application.c,v
Working file: application.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
this is the application program in the user space
open write and close is used
----------------------------
revision 1.2
date: 2014/05/24 07:49:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define some macros which are freq	uently used in our program.
----------------------------
revision 1.1
date: 2014/05/24 07:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
used to write in the multiple quantum
multiple qset
then use copy_from_user.
very important file and hard too.
----------------------------
revision 1.2
date: 2014/05/24 07:47:23;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:56;  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:
used for the mapping purpose.
----------------------------
revision 1.1
date: 2014/05/24 07:18:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to insert the module the register the module.
in this i dont use trim function.
----------------------------
revision 1.1
date: 2014/05/24 07:12:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
declare the prototype.
----------------------------
revision 1.1
date: 2014/05/24 07:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to remove and unregistered the module from the /proc/devices table.
----------------------------
revision 1.1
date: 2014/05/24 07:13:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
open the module in the kernel layer by passing the argument from the application layer of the open system call.
here we are not using the trim funciton.
----------------------------
revision 1.1
date: 2014/05/24 07:15:18;  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:
for closeing the module
----------------------------
revision 1.1
date: 2014/05/24 07:16:45;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define macros and include header file in this and make a ScullDev and ScullQset structure in this.
----------------------------
revision 1.1
date: 2014/05/24 07:11:00;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: application.c,v
Working file: application.c
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;	selected revisions: 5
description:
this is the application program in the user space
open write and close is used
----------------------------
revision 1.5
date: 2014/05/24 11:49:01;  author: root;  state: Exp;  lines: +9 -9
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 11:35:56;  author: root;  state: Exp;  lines: +12 -12
close the fd for the writing then open it again in the read mode.
----------------------------
revision 1.3
date: 2014/05/24 09:07:54;  author: root;  state: Exp;  lines: +16 -2
close the fd for the write operation(important to close the fd otherwise use lseek)
then open in the read mode then read while using its file descriptor.
----------------------------
revision 1.2
date: 2014/05/24 07:49:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define some macros which are freq	uently used in our program.
----------------------------
revision 1.1
date: 2014/05/24 07:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devread.c,v
Working file: devread.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;	selected revisions: 8
description:
write the fuction for the read which is work in the kernel layer.
----------------------------
revision 1.8
date: 2014/05/24 11:40:26;  author: root;  state: Exp;  lines: +9 -5
give the defination for the read function.
----------------------------
revision 1.7
date: 2014/05/24 10:34:09;  author: root;  state: Exp;  lines: +7 -2
*** empty log message ***
----------------------------
revision 1.6
date: 2014/05/24 09:28:15;  author: root;  state: Exp;  lines: +5 -5
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/24 09:26:24;  author: root;  state: Exp;  lines: +7 -7
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 09:21:09;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.3
date: 2014/05/24 09:19:17;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:16:07;  author: root;  state: Exp;  lines: +1 -0
make a access to the private data to the sculldev
----------------------------
revision 1.1
date: 2014/05/24 09:09:26;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
used to write in the multiple quantum
multiple qset
then use copy_from_user.
very important file and hard too.
----------------------------
revision 1.2
date: 2014/05/24 07:47:23;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:56;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: fileopr.h,v
Working file: fileopr.h
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
used for the mapping purpose.
----------------------------
revision 1.2
date: 2014/05/24 09:09:56;  author: root;  state: Exp;  lines: +2 -1
do the mapping of read
----------------------------
revision 1.1
date: 2014/05/24 07:18:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to insert the module the register the module.
in this i dont use trim function.
----------------------------
revision 1.1
date: 2014/05/24 07:12:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
declare the prototype.
----------------------------
revision 1.2
date: 2014/05/24 09:07:02;  author: root;  state: Exp;  lines: +2 -0
mention the prototype of the read call which is is fs.h header file and is in the struct file_operations {
----------------------------
revision 1.1
date: 2014/05/24 07:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to remove and unregistered the module from the /proc/devices table.
----------------------------
revision 1.1
date: 2014/05/24 07:13:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
open the module in the kernel layer by passing the argument from the application layer of the open system call.
here we are not using the trim funciton.
----------------------------
revision 1.1
date: 2014/05/24 07:15:18;  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:
for closeing the module
----------------------------
revision 1.1
date: 2014/05/24 07:16:45;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define macros and include header file in this and make a ScullDev and ScullQset structure in this.
----------------------------
revision 1.1
date: 2014/05/24 07:11:00;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to remove and unregistered the module from the /proc/devices table.
----------------------------
revision 1.1
date: 2014/05/24 07:13:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
open the module in the kernel layer by passing the argument from the application layer of the open system call.
here we are not using the trim funciton.
----------------------------
revision 1.1
date: 2014/05/24 07:15:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
used to write in the multiple quantum
multiple qset
then use copy_from_user.
very important file and hard too.
----------------------------
revision 1.3
date: 2014/05/25 09:31:31;  author: root;  state: Exp;  lines: +11 -4
use the loff and filep->f_pos to see the position of the pointer.
this loff and filep->f_pos could not be updated automatically so we make the updation.
----------------------------
revision 1.2
date: 2014/05/24 07:47:23;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:56;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define macros and include header file in this and make a ScullDev and ScullQset structure in this.
----------------------------
revision 1.1
date: 2014/05/24 07:11:00;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define some macros which are freq	uently used in our program.
----------------------------
revision 1.1
date: 2014/05/24 07:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devread.c,v
Working file: devread.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;	selected revisions: 8
description:
write the fuction for the read which is work in the kernel layer.
----------------------------
revision 1.8
date: 2014/05/24 11:40:26;  author: root;  state: Exp;  lines: +9 -5
give the defination for the read function.
----------------------------
revision 1.7
date: 2014/05/24 10:34:09;  author: root;  state: Exp;  lines: +7 -2
*** empty log message ***
----------------------------
revision 1.6
date: 2014/05/24 09:28:15;  author: root;  state: Exp;  lines: +5 -5
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/24 09:26:24;  author: root;  state: Exp;  lines: +7 -7
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 09:21:09;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.3
date: 2014/05/24 09:19:17;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:16:07;  author: root;  state: Exp;  lines: +1 -0
make a access to the private data to the sculldev
----------------------------
revision 1.1
date: 2014/05/24 09:09:26;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to insert the module the register the module.
in this i dont use trim function.
----------------------------
revision 1.1
date: 2014/05/24 07:12:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
declare the prototype.
----------------------------
revision 1.3
date: 2014/05/25 11:29:17;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:07:02;  author: root;  state: Exp;  lines: +2 -0
mention the prototype of the read call which is is fs.h header file and is in the struct file_operations {
----------------------------
revision 1.1
date: 2014/05/24 07:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: application.c,v
Working file: application.c
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;	selected revisions: 6
description:
this is the application program in the user space
open write and close is used
----------------------------
revision 1.6
date: 2014/05/25 11:29:25;  author: root;  state: Exp;  lines: +11 -7
open the file in the O_RDWR mode then its capable to read and write from the files.
----------------------------
revision 1.5
date: 2014/05/24 11:49:01;  author: root;  state: Exp;  lines: +9 -9
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 11:35:56;  author: root;  state: Exp;  lines: +12 -12
close the fd for the writing then open it again in the read mode.
----------------------------
revision 1.3
date: 2014/05/24 09:07:54;  author: root;  state: Exp;  lines: +16 -2
close the fd for the write operation(important to close the fd otherwise use lseek)
then open in the read mode then read while using its file descriptor.
----------------------------
revision 1.2
date: 2014/05/24 07:49:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devlseek.c,v
Working file: devlseek.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/25 11:30:12;  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:
for closeing the module
----------------------------
revision 1.1
date: 2014/05/24 07:16:45;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: fileopr.h,v
Working file: fileopr.h
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
used for the mapping purpose.
----------------------------
revision 1.3
date: 2014/05/25 11:30:20;  author: root;  state: Exp;  lines: +2 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:09:56;  author: root;  state: Exp;  lines: +2 -1
do the mapping of read
----------------------------
revision 1.1
date: 2014/05/24 07:18:55;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Uncategorized | Leave a comment

slide show on mdc

Posted in Uncategorized | Leave a comment

Character Driver(Read from kernel layer)

#implementing the read from the kernel layer into the application layer after performing the write operation...
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
=============================================================================

RCS file: application.c,v
Working file: application.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
this is the application program in the user space
open write and close is used
----------------------------
revision 1.2
date: 2014/05/24 07:49:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define some macros which are freq	uently used in our program.
----------------------------
revision 1.1
date: 2014/05/24 07:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
used to write in the multiple quantum
multiple qset
then use copy_from_user.
very important file and hard too.
----------------------------
revision 1.2
date: 2014/05/24 07:47:23;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:56;  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:
used for the mapping purpose.
----------------------------
revision 1.1
date: 2014/05/24 07:18:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to insert the module the register the module.
in this i dont use trim function.
----------------------------
revision 1.1
date: 2014/05/24 07:12:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
declare the prototype.
----------------------------
revision 1.1
date: 2014/05/24 07:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to remove and unregistered the module from the /proc/devices table.
----------------------------
revision 1.1
date: 2014/05/24 07:13:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
open the module in the kernel layer by passing the argument from the application layer of the open system call.
here we are not using the trim funciton.
----------------------------
revision 1.1
date: 2014/05/24 07:15:18;  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:
for closeing the module
----------------------------
revision 1.1
date: 2014/05/24 07:16:45;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define macros and include header file in this and make a ScullDev and ScullQset structure in this.
----------------------------
revision 1.1
date: 2014/05/24 07:11:00;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: application.c,v
Working file: application.c
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;	selected revisions: 5
description:
this is the application program in the user space
open write and close is used
----------------------------
revision 1.5
date: 2014/05/24 11:49:01;  author: root;  state: Exp;  lines: +9 -9
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 11:35:56;  author: root;  state: Exp;  lines: +12 -12
close the fd for the writing then open it again in the read mode.
----------------------------
revision 1.3
date: 2014/05/24 09:07:54;  author: root;  state: Exp;  lines: +16 -2
close the fd for the write operation(important to close the fd otherwise use lseek)
then open in the read mode then read while using its file descriptor.
----------------------------
revision 1.2
date: 2014/05/24 07:49:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define some macros which are freq	uently used in our program.
----------------------------
revision 1.1
date: 2014/05/24 07:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devread.c,v
Working file: devread.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;	selected revisions: 8
description:
write the fuction for the read which is work in the kernel layer.
----------------------------
revision 1.8
date: 2014/05/24 11:40:26;  author: root;  state: Exp;  lines: +9 -5
give the defination for the read function.
----------------------------
revision 1.7
date: 2014/05/24 10:34:09;  author: root;  state: Exp;  lines: +7 -2
*** empty log message ***
----------------------------
revision 1.6
date: 2014/05/24 09:28:15;  author: root;  state: Exp;  lines: +5 -5
*** empty log message ***
----------------------------
revision 1.5
date: 2014/05/24 09:26:24;  author: root;  state: Exp;  lines: +7 -7
*** empty log message ***
----------------------------
revision 1.4
date: 2014/05/24 09:21:09;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.3
date: 2014/05/24 09:19:17;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2014/05/24 09:16:07;  author: root;  state: Exp;  lines: +1 -0
make a access to the private data to the sculldev
----------------------------
revision 1.1
date: 2014/05/24 09:09:26;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
used to write in the multiple quantum
multiple qset
then use copy_from_user.
very important file and hard too.
----------------------------
revision 1.2
date: 2014/05/24 07:47:23;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:56;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: fileopr.h,v
Working file: fileopr.h
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
used for the mapping purpose.
----------------------------
revision 1.2
date: 2014/05/24 09:09:56;  author: root;  state: Exp;  lines: +2 -1
do the mapping of read
----------------------------
revision 1.1
date: 2014/05/24 07:18:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to insert the module the register the module.
in this i dont use trim function.
----------------------------
revision 1.1
date: 2014/05/24 07:12:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
declare the prototype.
----------------------------
revision 1.2
date: 2014/05/24 09:07:02;  author: root;  state: Exp;  lines: +2 -0
mention the prototype of the read call which is is fs.h header file and is in the struct file_operations {
----------------------------
revision 1.1
date: 2014/05/24 07:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to remove and unregistered the module from the /proc/devices table.
----------------------------
revision 1.1
date: 2014/05/24 07:13:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
open the module in the kernel layer by passing the argument from the application layer of the open system call.
here we are not using the trim funciton.
----------------------------
revision 1.1
date: 2014/05/24 07:15:18;  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:
for closeing the module
----------------------------
revision 1.1
date: 2014/05/24 07:16:45;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define macros and include header file in this and make a ScullDev and ScullQset structure in this.
----------------------------
revision 1.1
date: 2014/05/24 07:11:00;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Uncategorized | Leave a comment

Character Driver(Write in the multiple Qsets)

#here i am able to write in the multiple qsets 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
=============================================================================

RCS file: application.c,v
Working file: application.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
this is the application program in the user space
open write and close is used
----------------------------
revision 1.2
date: 2014/05/24 07:49:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define some macros which are freq	uently used in our program.
----------------------------
revision 1.1
date: 2014/05/24 07:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
used to write in the multiple quantum
multiple qset
then use copy_from_user.
very important file and hard too.
----------------------------
revision 1.2
date: 2014/05/24 07:47:23;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.1
date: 2014/05/24 07:17:56;  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:
used for the mapping purpose.
----------------------------
revision 1.1
date: 2014/05/24 07:18:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to insert the module the register the module.
in this i dont use trim function.
----------------------------
revision 1.1
date: 2014/05/24 07:12:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: prototype.h,v
Working file: prototype.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
declare the prototype.
----------------------------
revision 1.1
date: 2014/05/24 07:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
this is used to remove and unregistered the module from the /proc/devices table.
----------------------------
revision 1.1
date: 2014/05/24 07:13:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
open the module in the kernel layer by passing the argument from the application layer of the open system call.
here we are not using the trim funciton.
----------------------------
revision 1.1
date: 2014/05/24 07:15:18;  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:
for closeing the module
----------------------------
revision 1.1
date: 2014/05/24 07:16:45;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
define macros and include header file in this and make a ScullDev and ScullQset structure in this.
----------------------------
revision 1.1
date: 2014/05/24 07:11:00;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Uncategorized | Leave a comment

writing in character driver with multiple quantum

#include”header.h”
#include”declration.c”
struct ScullQset *create_scullqset(int nosqset)
{
struct ScullQset *lscullqset,*temp,*new;
int i,flag=1;
lscullqset=NULL;
//int i;

printk(KERN_INFO”begin=%s\n”,__func__);
for(i=0;inext=NULL;
lscullqset->data=NULL;
}
else
{
new = (struct ScullQset *)kmalloc(sizeof(struct ScullQset),GFP_KERNEL);
new->next=NULL;
new->data=NULL;
temp->next=new;
temp=temp->next;
}

#include”header.h”
#include”declration.c”
struct ScullQset *create_scullqset(int nosqset)
{
struct ScullQset *lscullqset,*temp,*new;
int i,flag=1;
lscullqset=NULL;
//int i;

printk(KERN_INFO”begin=%s\n”,__func__);
for(i=0;inext=NULL;
lscullqset->data=NULL;
}
else
{
new = (struct ScullQset *)kmalloc(sizeof(struct ScullQset),GFP_KERNEL);
new->next=NULL;
new->data=NULL;
temp->next=new;
temp=temp->next;
}

Posted in Character Driver | Leave a comment

SOME BASIC QUESTIONS WHEN WE START WITH CHARACTER DRIVER .DO YOU HAVE ANSWERS ?

Working of character driver :see diagram & also see some queries of character driver.http://www.opensourceforu.com/wp-content/uploads/2011/02/figure_7_character_driver_overview.png





The above diagram show how the character driver works in linux , user space to kernel space .

but when we implementing the driver there are many issues are find from inserting a driver to Removing the driver.

some are following:

  1. why we use use sculldev because only cdev work as device of application ?
  2. why we use container_of function if it,s only use of access the cdev address then what is its internal operations and how it work ?
  3. we use kmalloc for providing the memory to sculldev if we want to print the value of sculldev which is garbage then that show errors : the variable is struct sculldev but we print value with %c ,there have no effect if we use type casting , what is solution ?
  4. we use memset for fill the null values in sculldev how we can check sculldev filled with null ?
  5. In cleanup function we use kfree ,that means free the memory of sculldev ,how we can check memory is totally free ,i mean how we can see that ?
  6.  The return type of unregister_chrdev_region is void ,if we want check our device is unregistered sucessfully using printk statement.
  7. what is motive of using cdev_del function because we already use rmmod,unregister function and after that cdev_del function ,what main purpose of this function ,we can see the output of this function.
  8. what fundamentals of struct file and why we make the  struct file_operations because that is already included in header file which is fs.h and cdev.h .
Posted in Uncategorized | Leave a comment