/dev/null (was Re: Daemonizing question...)

The Grey Wolf greywolf at unisoft.UUCP
Tue Mar 5 09:53:30 AEST 1991


<2974 at cirrusl.UUCP> by dhesi%cirrusl at oliveb.ATC.olivetti.com (Rahul Dhesi)
# If you ever lose /dev/null, you can always restore it from a backup.
# (You *do* back up /dev/null often, don't you?)
# 
# Actually, I'm not joking.  The last time I lost /dev/null, I was unable
# to find its major/minor numbers in the vendor-supplied documentation,
# so I simply restored it from a backup.

Well, you can look in your local conf.c or config.c file somewhere in
/usr(/src)/sys (depending on whether or not you have source), and look
in the cdevsw[] array.

You can look at /dev/mem and /dev/kmem.  Chances are pretty good that
the major number for /dev/null is the same as those two; the minor number
is (usually) one greater than /dev/kmem.

#define SARCASM
You can always try

atlarge# cd /dev
atlarge# sh -x ./MAKEDEV
#undef SARCASM	/* MAKEDEV is a Berkelefication */

# --
# Rahul Dhesi <dhesi%cirrusl at oliveb.ATC.olivetti.com>
# UUCP:  oliveb!cirrusl!dhesi


-- 
# The days of the computer priesthood are not over.
# May they never be.
# If it sounds selfish, consider how most companies stay in business.



More information about the Comp.unix.internals mailing list