home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / minix / 4321 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.1 KB  |  48 lines

  1. Path: sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!iagu.itd.adelaide.edu.au!newton
  2. From: newton@iagu.itd.adelaide.edu.au (Mark Newton)
  3. Newsgroups: comp.os.minix
  4. Subject: Re: Question init.c <--> /etc/utmp
  5. Keywords: init login utmp wtmp
  6. Message-ID: <8341@sirius.ucs.adelaide.edu.au>
  7. Date: 27 Aug 92 05:49:42 GMT
  8. References: <1992Aug25.135457.26129@walter.cray.com> <meulenbr.714819852@cstw168>
  9. Sender: news@ucs.adelaide.edu.au
  10. Organization: University of Adelaide, South Australia
  11. Lines: 34
  12. Nntp-Posting-Host: iagu.itd.adelaide.edu.au
  13.  
  14. In article <meulenbr.714819852@cstw168> meulenbr@prl.philips.nl (Frans Meulenbroeks) writes:
  15. >leno@grumpy.cray.com (Scott J. Leno) writes:
  16. >
  17. >>  I have been looking into why I seem to be logged in several times when I
  18. >> run the who command. It stems from init not zeroing the /etc/utmp entry
  19. >
  20. >In /etc/rc add the line:
  21. >>/etc/utmp
  22. >which will clear the file whenever the system is booted.
  23. >No need to change init.
  24.  
  25. Actually, there is a need to change init to handle wtmp properly in the
  26. Amiga MINIX Prentice-Hall distribution (and probably the other m68k
  27. MINIXes as well).
  28.  
  29. There's a call to time() that looks something like "ut.ut_time = time()"
  30. which doesn't work due to the fact that init.c doesn't #include <time.h>.
  31. The compiler thinks, "Duh!  time() hasn't been prototyped, so I'll
  32. assume that it returns an int!" when it should be returning a long.
  33. m68k byte ordering no doubt makes it work properly under PC MINIX,
  34. but the 68000 version of the ACK compiler makes time() (and most other
  35. functions, for that matter) return incorrect values if they're not
  36. prototyped.
  37.  
  38. So, if any m68k MINIX users have been puzzled about all the question
  39. marks in the output from the "last" command, you can fix it by putting
  40. #include <time.h> at the top of init.c and rebuilding.
  41.  
  42.    - mark
  43. -- 
  44. ------------------------------------------------------------------
  45.          'Do not expose your LaserWriter to naked flame...'
  46. newton@iagu.itd.adelaide.edu.au         - Apple LaserWriter Manual
  47. ------------------------------------------------------------------
  48.