home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8342 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.2 KB

  1. Xref: sparky comp.unix.aix:8342 bit.listserv.aix-l:1282
  2. Path: sparky!uunet!olivea!news.bbn.com!mips2!fhr.ma30.bull.com!mkubi
  3. From: mkubi@fhr.ma30.bull.com (Matt Kubik)
  4. Newsgroups: comp.unix.aix,bit.listserv.aix-l,bull.sys.aix
  5. Subject: Tape marks and end-of-data on QIC tapes
  6. Message-ID: <1992Jul30.203535.5360@mips2.ma30.bull.com>
  7. Date: 30 Jul 92 20:35:35 GMT
  8. Sender: news@mips2.ma30.bull.com (Usenet News Manager)
  9. Organization: Bull HN Information Systems Inc.
  10. Lines: 21
  11.  
  12. Hi,
  13.  
  14.   I'm writing an application that reads data from
  15. QIC tapes using the read() system call.  I've noticed
  16. that when I encounter either a tape mark (EOF condition)
  17. or an end-of-data condition, the read simply returns 0 bytes.
  18.  
  19. At this point, is there any way to determine which
  20. of the two events actually occurred?
  21.  
  22. I've noticed that with 8mm tapes, read returns -1
  23. and errno is set to EIO when the end-of-data is reached,
  24. while running into a tape mark causes read to return 0.
  25. This is nice since I know what was found on the tape.
  26. But I haven't found a way to distinguish between
  27. tape marks and end-of-data on QIC tapes.  The rmt man
  28. pages don't seem to help.
  29.  
  30. I would appreciate any help.  Thanks.
  31.  
  32. M.Kubik@bull.com
  33.