int main() { int fd,wr; char ch[]=”Emblogic”; char *name; name = malloc(sizeof(char)*233); if(name==NULL) { perror(“Malloc”); } fd=open(“file.txt”,O_WRONLY); printf(“File descripter =%d\n”,fd); wr = write(fd,ch,7); if(wr == -1) { perror(“write”); } printf(“wr =%d\n”,wr); sprintf(name,”%d”,fd); printf(“%s\n”,name); execl(“fd1″,”fd1″,name,0); printf(“Bye\n”); }
#ifndef _IOC_NONE # define _IOC_NONE 0U #endif #ifndef _IOC_WRITE # define _IOC_WRITE 1U #endif #ifndef _IOC_READ # define _IOC_READ 2U #endif please explain these MACROS and their Scalar values used for determining the direction
I did Block Device Driver and now, ‘m working on C.
successfully implemented the registration of the driver using register_chrdev, alloc_chrdev_region.and unregistration using unregister_chrdev ,unregister_chrdev_region …….., implemented passing of module_parameter to the module using module_param()…… issues faced: kmalloc not functioning properly……….
working on project 7 serial port device driver. inthis i setup a communication between two computers serially by using serial port.
i have completed the given assignment on process replacement.
Completed till assignment 4(ARRAY).. Working on Assignment 5(STRINGS)..
i m giving online c n data structure test.
Implemented register_chrdev(),unregister_chrdev(),alloc_chrdev_region(),unregister_chrdev_region….
Assingment 01 ,02, 03 completed .. working on ASSINGMENT 04 ……………………..