EmbLogic's Blog

Author Archives: gulpreet.e2

Read Write driver

Application program for read/write #include<stdio.h> #include<fcntl.h>       // For open() #include<unistd.h>      // For read() #include<string.h> int main(int charc, char * argv[]) { int fd; char wbuf[40]; char rbuf[40]; ssize_t rd,wr; strcpy(wbuf,”HELLO KERNEL!!\n”); strcpy(rbuf,””); fd = open(argv[1], O_RDWR); printf(“File Descp. = %d\n”,fd); … Continue reading →

3 Comments