Skip navigation.
Home
The QNX Community Portal

View topic - problem with UNIX time

problem with UNIX time

For the old QNX2 and QNX4 RTOS

problem with UNIX time

Postby Pogoda » Mon Jul 13, 2009 9:07 am

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.
Pogoda
Active Member
 
Posts: 29
Joined: Tue Mar 17, 2009 10:37 am

RE: problem with UNIX time

Postby mario » Mon Jul 13, 2009 2:19 pm

Make sure rtc is executed BEFORE any of the drivers are started.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: problem with UNIX time

Postby juanplacco » Mon Jul 13, 2009 8:57 pm

Is the battery ok?
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

RE: problem with UNIX time

Postby Pogoda » Fri Jul 17, 2009 3:53 am

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.
Pogoda
Active Member
 
Posts: 29
Joined: Tue Mar 17, 2009 10:37 am

RE: problem with UNIX time

Postby panda » Wed Jul 29, 2009 7:31 pm

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
panda
Active Member
 
Posts: 39
Joined: Thu Feb 26, 2004 9:37 am

RE: problem with UNIX time

Postby mario » Wed Jul 29, 2009 10:09 pm

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 ;-)
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: problem with UNIX time

Postby Pogoda » Wed Aug 19, 2009 4:32 am

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
what "history" and /dev/hd0 have to do with each other

It's meaning of our top-engineer :roll: and I try to solve this problem :shock:
Pogoda
Active Member
 
Posts: 29
Joined: Tue Mar 17, 2009 10:37 am

RE: problem with UNIX time

Postby maschoen » Wed Aug 19, 2009 3:20 pm

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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

RE: problem with UNIX time

Postby mario » Wed Aug 19, 2009 7:54 pm

I believe the doc on Fsys documents pretty well how to start more then one?
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to QNX2 and QNX4

Who is online

Users browsing this forum: No registered users and 1 guest