SCOUG-Programming Mailing List Archives
Return to [ 29 |
July |
2001 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
leganii@surfree.com wrote:
>
> I don't have any IBMCOM entry in my path - am I in danger?
Mine points to my \IBMCOM\ directory wherein there's networking files --
MPTS and LAPS (LAN Adapter and Protocol Support) and stuff like that.
My CONFIG.SYS has several references to \IBMCOM\ but they're all for
networking stuff -- LIBPATH, PATH, DPATH plus three networking device
drivers (DEVICE=) and a CALL=...NETBIND.EXE and a RUN=...LANMSGEX.EXE.
> I know of no reason the COMSPEC has
> to point to a file on the boot drive.
Yes, that's why I'm worried and it's why I'm checking three different
ways and comparing the results.
I've just modified my code to return a "string of potential boot
drives", for example you might receive "C:" or you might receive "C: D:
E:" as the result string. I get all the possible drive letters
(deleting duplicates as they're encountered), sort them (bubble, it's a
short list), and delimit them with spaces so Rexx functions like WORD(),
WORDS() and the PARSE operator can work on them. But when more than one
drive letter is returned I still don't know the correct one. (On my
test system I only get one letter in the return string.)
> > PSTAT /C | FIND /I "PMSHELL" | RXQUEUE
>
> I can only confuse the issue. :-)
I haven't seen my "PSTAT" method (above) used anywhere else but it seems
to work and should be fairly reliable. Again, however, there's no
reason why the shell can't be on a different drive.
PSTAT returns a couple of "(kernel)" mentions but there's no drive
specified with those. (PSTAT /C | FIND /I "KERNEL")
There might be some other cross-reference checks available. I don't
know the HPFS API but perhaps there's a call which tells you when each
HPFS drive was initialized. Perhaps TIMER0.SYS (loaded by BASEDEV=) has
an "initialized time" call.
The other problem is determining the boot time. Checking the
SWAPPER.DAT file *creation* date-time works but there are some
problems. First, the machine's config.sys may not include a swap file.
Second, I haven't yet figured out how to get a file's creation date-time
with Rexx (I suspect it's available through one of the system calls).
Third, there might be more than one SWAPPER.DAT file on a partition,
drive or system (it happens if its location has been moved in config.sys
but the old file wasn't deleted or if bootups from different partitions
put the file in different places). And then there's the dilemma of
booting up and then having the user change the system date-time from a
command line (using the DATE and TIME commands) -- there's no *elapsed*
time call as far as I know (I don't think the generic hardware has such
a counter although newer Pentium chips have an on-chip cycle counter
which I believe was written up in Dr. Dobbs several years ago -- I'll
have to check the Intel microprocessor documentation for the instruction
to retrieve it -- and that's power-up time not OS/2 time plus you have
to know the clock speed so you can calculate elapsed time from the cycle
count).
- Peter
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 29 |
July |
2001 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|