problem with UNIX time

In qnx 4.25 in midnight commander I see what in Dev devices fd0. hd0, hd0t77 and hd1 have modify time “1 Jan 1970”. Other devices in this directory have normal modify time, according current date and time. And with it we have some problems in our programes such not writing history, etc. How I can fix this problem?

Thank you

p.s. Sorry of my poor english.

Make sure rtc is executed BEFORE any of the drivers are started.

Is the battery ok?

mario
in our sysinit rtc start after TZ=… and before any drivers

juanplacco
this problem also in other QNX machines. I think it’s not possible what all baterries aren’t ok. But I try to see the batteries.

You are starting the Fsys.eide, Fsys.atapi or Fsys.floppy in the bootimage!
Therefore you arent able to let rtc run before you start these drivers.

Possibility (but a lot of work):
start a Fsys -r to enable ramdisk
copy needed commands into ramdisk
switch to script in ramdisk
read the time (rtc hw)
script terminates Fsys.eide, Fsys,atapi,… and starts them again

Getting back to the original post, how would the time of /dev/hd0, /dev/fd0, etc affect your program. I mean these are raw devices that unless you are doing some very low-level stuff aren’t access by your typical application. Can’t you just ignore them? Just a wild guess, I have no idea what you need to do. I just don’t see what “history” and /dev/hd0 have to do with each other ;-)

panda
How I can run Fsys -r size of ramdisk if qnx writes :resource is busy when I’m trying to run this command? With bootable qnx diskette?

mario

It’s meaning of our top-engineer :unamused: and I try to solve this problem :open_mouth:

Fsys is probably already running. You could Slay Fsys but then you would not be able to run any commands.

There are two solutions. 1) Modify your boot file so that when Fsys is first started you give it the ramdisk parameters. 2) There is a parameter that tells Fsys to run a second version of Fsys. The difference is that the 2nd version registers a different name. I don’t recall what the parameter is, and I suspect a “use Fsys” may not tell you either as this is a parameter usually used only for testing new Fsys drivers.

I believe the doc on Fsys documents pretty well how to start more then one?