Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
I am writing a simple char device that generates pseudo-random numbers, the problem is when I try to read from that char device, i.e when I write this command "cat (device's dictionary)" it reads 3 times which is really weird. anyone can help me out please.
here is the printk messages i wrote to test my read device
Code:
Starting char device
allocated a new major, 248
opend the char device, with minor 0
reading a char device, seed = 0
reading a char device, seed = 12345
reading a char device, seed = -740551042
releasing the char device.
thanks in advance
EDIT: upon further testing, i think i found out what is the problem, i made a tester from user space and used the functions open and read, now the problem is that reads only one random number then stops, is there a way to make it read as many times as the buffer's size?
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe