[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: date reset on a /dev/ file



On Mon, Feb 11, 2002 at 02:46:01AM +0100, Günter Knab wrote:
| 
| On Sun, 10 Feb 2002, dman wrote:
| 
| > On Sun, Feb 10, 2002 at 04:38:10PM -0800, ben wrote:
| > | On Sunday 10 February 2002 03:34 pm, ben wrote:
| > | > one if my /dev/ files has a mysterious date of 0 april 2001. has anyone had
| > | > this before. can i/should i manually reset that, and, if so, how is it
| > | > done?
| > |
| > | to follow up on that problem, cat /dev/<file> returns 'no such device' even
| > | though ls -al shows that it's there.
| >
| > The existence of the inode on the disk is irrelevant to anything.
| 
| Ha?  If there exists an inode on your disk it _has to_ belong to
| something (at least lost+found).  This is called consistency.

Right, but I was referring to the "I've got a file in /dev but the
system says 'no such device'" relationship.  The existence of any
given inode in /dev has no bearing on the actual devices in the
machine or the kernel's ability to interact with them.

| > This is one of the reasons for 'devfs'.  I just looked at one of the
| 
| What do you mean with 'devfs'? 

/usr/share/doc/kernel-doc-2.4.17/Documentation/filesystems/devfs/README.gz
    or
http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html


What is it?

Devfs is an alternative to "real" character and block special devices
on your root filesystem. Kernel device drivers can register devices by
name rather than major and minor numbers. These devices will appear in
devfs automatically, with whatever default ownership and
protection the driver specified. A daemon (devfsd) can be used to
override these defaults. Devfs has been in the kernel since 2.3.46.

| A filesystem device?  It's enough to me to know, that's everything
| is a file (an object I can read from or write to).

It's a ("fake") filesystem, similar to /proc, for devices.  With
devfs, if you don't have the device (or its driver) then you don't
have the file and vice versa.  Only with devfs does the existence of
/dev/dsp mean you really have a sound card (except that's not the real
name of it anymore).

| > files in my /dev and it has a date of Dec 31, 1969.  (the epoch)  I'm
| > using devfs, though.
| 
| "the epoch" starts at Jan. 1, 1970, 00:00 GMT as an unsigned int, so Dec
| 31, 1969 simply doesn't exist:)  Do you have problems with some libs?  Or
| do you just have changed the timezone?

I haven't changed anything in a while.  My timezone is EST (or EDT
now, I never did figure out daylight savings time).

$ ls -l /dev/ide/host0/bus0/target0/lun0/disc
brw-rw----    1 root     disk       3,   0 Dec 31  1969 /dev/ide/host0/bus0/target0/lun0/disc

This is my hard drive.

-D

-- 

Through love and faithfulness sin is atoned for;
through the fear of the Lord a man avoids evil.
        Proverbs 16:6



Reply to: