How to use mknod to create /dev/one

How to use mknod to create /dev/one

Post by Geoffrey Steeve » Thu, 25 May 2000 04:00:00



I'm trying to create a device file like /dev/zero, except instead of
returning a zero I want the file to return the byte 255.  I've read the
man and info pages on mknod, and everything is clear, but I don't know
anything about what major and minor number to use.  ANy help would be
great.  Thanks.

--
_______________________________________________________________________________
             Geoff Steeves // University of Alberta Physics //

                        http://www.ualberta.ca/~gsteeves
-------------------------------------------------------------------------------

 
 
 

How to use mknod to create /dev/one

Post by Kari Pahul » Thu, 25 May 2000 04:00:00



>I'm trying to create a device file like /dev/zero, except instead of
>returning a zero I want the file to return the byte 255.  I've read the
>man and info pages on mknod, and everything is clear, but I don't know
>anything about what major and minor number to use.  ANy help would be
>great.  Thanks.

Device minor and major numbers just give information to the kernel
about the services requested.  If you really want to have a device,
that returns 255's, you'd have to tinker with the kernel, since there
is no such service present in the kernel.

Are you sure you couldn't use a FIFO instead?

 
 
 

1. copy files under /dev or create new one

Hi there,

Currently I am doing a backup of my LinuX installation. Since I need a
really reliable system I use a second hard disk which is partitioned to
hold a complete mirror of my running system.
The problem I have is that the files under /dev and some files under
/var/ cannot be copied. Is there any possibility to obtain a copy of the
files (devices) under /dev and /var so that in case of a hard disk crash
I can just switch to the second hard disk?

Thanks in advance

Uwe
--
+--------------------------------------------------
| Uwe Pross

| www  : http://www.tu-chemnitz.de/~uwp
+--------------------------------------------------

2. mouse

3. Creating and using /dev/apm_bios

4. Corrupted files on fat32 partition (dual boot Win98/Linux)

5. creating tty's, mknod, stuck after boot with wrong tty - help

6. 2 network cards one problem

7. Missing piece creating null device with mknod

8. Unix Programming: good reference books?

9. mknod prob. Can't create tty8 and 9

10. creating device with mknod

11. mknod - misbehaving when creating a null device

12. mknod for /dev/zsh0 (serial port)

13. mknod for SLIP (/dev/sl0)