EmbLogic's Blog

Author Archives: zaffer

block driver crashes on add_disk

here is the code #include”header.h” dev_t dev;     void bulk_request(struct request_queue *q) { struct request *req; req = blk_fetch_request(q); while (req != NULL) { if (req == NULL || (req->cmd_type != REQ_TYPE_FS)) { printk (KERN_NOTICE “Skip non-CMD request\n”); __blk_end_request_all(req, … Continue reading

Posted in Block Driver | Leave a comment

block driver crashes

#include i the driver crashes the moment it reaches add_disk…….following are the /var/log/messages…….rest works properly….. hope if ani one helps.ya mi home directory has 0 bytes memory Aug 5 10:03:45 zaffer kernel: [ 5936.683085] Begin : start Aug 5 10:03:45 … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

parallel port stpper motor via ioctl by zaffer

long scull_ioctl (struct file * filp, unsigned int cmd, unsigned long arg) { struct sculldev *lsculldev; int err=0; lsculldev=filp->private_data; #ifdef DEBUG printk(KERN_INFO”In %s function\n”,__func__); #endif #ifdef DEBUG printk(KERN_INFO”nalue of cmd is %d\n”,cmd); #endif if (_IOC_TYPE(cmd) != MAGIC_NUMBER) { #ifdef DEBUG … Continue reading

Posted in Uncategorized | Leave a comment

sytem crashes while implementing compleion

hi, i am trying o implement completion. i have to simple applications one for read and other for write. my code is as follows struct sculldev{ ……….. ……….. struct completiom my_completion; ……. ………… }; scullread(……..) {declare vriables……struct sculldev *lsculldev; wait_for_completion(lsculldev->my_completion); … Continue reading

Posted in Uncategorized | Leave a comment

ISO C90 forbids mixed declarations and code

make -C /lib/modules/2.6.36.4/build M=/home/zaffer/linux modules make[1]: Entering directory `/usr/src/linux-2.6.36.4′ CC [M] /home/zaffer/linux/lko.o /home/zaffer/linux/lko.c: In function ‘start’: /home/zaffer/linux/lko.c:36:10: warning: ISO C90 forbids mixed declarations and code// WAT IS THE ABOVE LINE?……….//…………####### Building modules, stage 2. MODPOST 1 modules WARNING: “scull_open” [/home/zaffer/linux/lko.ko] … Continue reading

Posted in Uncategorized | Tagged | 2 Comments

cvs server

cvs server sucessfully created . however client operations are yet to be performed zaffer

Posted in Uncategorized | Leave a comment

linklidt and scull

problem is while traversing it gives the segmentation fault. #include<stdio.h> #include<unistd.h> #include<stdlib.h> struct linklist{ char **data; struct linklist *next; }*start,*temp,*last; int main() { int i,j,m,l; int quantams; char y; start=(struct linklist*)malloc(sizeof(struct linklist)); temp=(struct linklist*)malloc(sizeof(struct linklist)); //last->data=malloc(sizeof(char*)*); //printf(“enter the dat in … Continue reading

Posted in Uncategorized | Tagged | 1 Comment