EmbLogic's Blog

status of character driver and scull

yesterday i was completed the scull and trimming  and today i am working on the write operation in the character driver.

Posted in Uncategorized | Leave a comment

facing with output in qo6 of assignment01

can anyone explain the output of

y>>=3; printf(“%d\n”y);

thanks

Posted in Uncategorized | 1 Comment

status related to character driver

i have done initialization,registration,open,release,trim.

Posted in Character Driver | Leave a comment

status of character driver

i have successfully implemented scull trimming .

Posted in Character Driver | Leave a comment

char driver

scull_triming and maping of scull_write has been done

Posted in Character Driver | Comments Off

Trim function………………..

please write appropriate comment………………

//this function only remove last node of the scull_dev  because it has not any  reverencing  function for deleting previous nodes till the fist node.

//sir has taken one previous pointer but it also deletes  only one node that is just before the last node  but we want to delete or free every node…….how it will done……

// if we uses the recursion till the first will not deleted………….

int trim(struct scull_dev *start)
{
int i;

if(start)
{ if(start->data)
{
while(start->data->next)

start->data=start->data->next;

if(start->data->data)
{
for(i=QSET;i>=0;i–)
{
start->data->data[i]=NULL;
}
start->data->data=NULL;
}
else
printk(KERN_INFO”\nThere is No Qset”);

}
else start->data=NULL;
printk(KERN_INFO “\n NO Qset available”);
}
else
printk(KERN_INFO “\n There Is No Scull_dev”);

return 0;
}

Posted in Character Driver | 1 Comment

status of Multiple data compression

i have completed multiple data compression and Decompression using 4 bit

Posted in Uncategorized | Leave a comment

status on character driver

i have completed registration, initialization, open, release, and working on trim.

Posted in Character Driver | Leave a comment

timing operations c driver

Is tick rate = HZ????

 

Posted in Character Driver | 2 Comments

status of character driver.

I have completed registration,initilazation and open,release in the character driver and now i am work out on the scull and decompression of a string.

Posted in Uncategorized | Leave a comment

char_driver

Posted in Uncategorized | Leave a comment

status on project provided

Char device driver ->done
compression -> left with last part of comparing and uncompressed data
SCULL -> done for the scull size of 16 and limited data flow

Posted in Uncategorized | Leave a comment

Update on char DD

Well, upto date with the char device driver module

Posted in Uncategorized | Leave a comment

scull for adding one item……………….. try on gcc it may require some modification

#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/stat.h>
//#include<fcntl.h>
//#include<unistd.h>
#include<string.h>

#define QSET 3           //size of the pointer array ,points to quantum.
#define QUANTUM 4        //size of quantum.

struct scull_dev
{
	struct scull_qset *data;            //points to scull qset
	int qset;                          //qset size
	int quantum;                       // quantum size
};

struct scull_qset                  // link list structure
{
	struct scull_qset *next;
	char **data;
};

int data(struct scull_dev*);       //entering data.
void display(struct scull_dev*);    // to display data.

int main()
{
	struct scull_dev *link;       //link list pointer

	link=(struct scull_dev *)malloc(sizeof(struct scull_dev));

	//....................scull data.......
	data(link);
	//.........distplay.....................
	display(link);
	return 0;
}

//.......entering into the 2D array .............
int data(struct scull_dev *start)

{       int i;

	start->data=(struct scull_qset*)malloc(sizeof(struct scull_qset));
	start->data->next=NULL;
	start->data->data=malloc(sizeof(char)*QSET);
	for(i=0;i<QSET;i++)
	{
	    start->data->data[i]=malloc(sizeof(char)*QUANTUM);
	    start->data->data[i]="abcd";

	}      //quantum end
	return 0;
}
//........display function.................
void display(struct scull_dev *start)
{
	int i;
		for(i=0;i<QSET;i++)
	{

	   printf("\n%s", start->data->data[i]);

	}      //quantum end

}
Posted in Data Structures with C | 1 Comment

for finding substring into the sentance u can get idea by this program…………

#include <stdio.h>

int find_substr(char *listPointer, char *itemPointer);

int main(void)
{
if(find_substr(“C is fun”, “is”) != -1)
printf(“Substring is found.”);
else
printf(“not found”);

return 0;
}

/* Return index of first match of itemPointer in listPointer. */
int find_substr(char *listPointer, char *itemPointer)
{
int t;
char *p, *p2;

for(t=0; listPointer[t]; t++) {
p = &listPointer[t];
p2 = itemPointer;

while(*p2 && *p2==*p) {
p++;
p2++;
}
if(!*p2) return t; /* 1st return */
}
return -1; /* 2nd return */
}

Posted in Data Structures with C, Uncategorized | Leave a comment