how can i create a device like /dev/zero?
Hello,
how can write a device like /dev/zero that willl output instead of zeroes ones and will be /dev/one. Also where can i find /dev/zero source code? thans. |
have you heard about the program called yes?
__________________________________ Happy with solution ... mark as SOLVED If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post. |
I was under the impression that /dev/zero, like /dev/null, was an output-only thing?
|
what is the program Yes? and yeah they are an output devices.. what it has to do wuth the question?
edit: yes doesnt work out for me.. i want to create an actual device |
yes is not a device, but a simple program.
Here is a tutorial on creating a basic char device: http://learninglinuxkernel.com/Basic...Driver_07.html __________________________________ Happy with solution ... mark as SOLVED If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post. |
"yes" doesnt workout for me i want to create a device similliar to /dev/zero that will output 1's
|
does anyone knows where /dev/zero source code is located?
|
I gave you a link about how to create a simple device. Have you tried?
|
Quote:
noone234, what you want is to create a character device as pan64 indicated. A complete test program is provided at the end of the linked page. Please mark this thread as solved if you are satisfied with that answer. Edit: Realized input/output might be confusing. By output I mean "read-from". |
All times are GMT -5. The time now is 02:58 PM. |