Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2001 13:20:04 -0800 (PST)
From:      Rich Morin <rdm@cfcl.com>
To:        freebsd-doc@freebsd.org
Subject:   Re: docs/24786: missing FILES descriptions in sa(4)
Message-ID:  <200102092120.f19LK4w20665@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/24786; it has been noted by GNATS.

From: Rich Morin <rdm@cfcl.com>
To: Julian Elischer <julian@elischer.org>
Cc: Nik Clayton <nik@freebsd.org>, FreeBSD-gnats-submit@freebsd.org,
	mjacob@freebsd.org
Subject: Re: docs/24786: missing FILES descriptions in sa(4)
Date: Fri, 9 Feb 2001 13:09:43 -0800

 At 11:48 AM -0800 2/9/01, Julian Elischer wrote:
 >I'm not sure if it's STILL true, but when I write it originally,
 >the submodes were so that you could have a single device programmed
 >up to use different block sizes and densities, and teh nyou could
 >read/write tapes in those densities by just using the different
 >subdevices.
 >(e.g. .1 might write in 3K blocks and .2 might right in variable
 >block mode) useful if you are distributing media to people with
 >machines with different capabilities.
 
 Well, that certainly isn't what the sa(4) man page says:
 
 SUB-MODES
       Bits 0 and 1 of the minor number are interpreted as `sub-modes'. The sub-
       modes differ in the action taken when the device is closed:
 
       00    A close will rewind the device; if the tape has been written, then
             a file mark will be written before the rewind is requested.  The
             device is unmounted.
 
       01    A close will leave the tape mounted.  If the tape was written to, a
             file mark will be written.  No other head positioning takes place.
             Any further reads or writes will occur directly after the last
             read, or the written file mark.
 
       10    A close will rewind the device.  If the tape has been written, then
             a file mark will be written before the rewind is requested.  On
             completion of the rewind an unload command will be issued.  The de-
             vice is unmounted.
 
 FWIW, /usr/src/sys/cam/scsi/scsi_sa.c contains the code
 
    typedef enum {
          SA_MODE_REWIND          = 0x00,
          SA_MODE_NOREWIND        = 0x01,
          SA_MODE_OFFLINE         = 0x02
    } sa_mode;
    ...
    #define SAMODE(z) ((minor(z) & 0x3))
    ...
    #define SA_NUM_MODES    4
    struct sa_devs {
          dev_t   ctl_dev;
          struct sa_mode_devs {
                  dev_t   r_dev;
                  dev_t   nr_dev;
                  dev_t   er_dev;
          } mode_devs[SA_NUM_MODES];
          dev_t   r_dev;
          dev_t   nr_dev;
          dev_t   er_dev;
    };
 
 So, it _appears_ to me that the modes have been taken over to do the
 same things as the [en] flags.  If this is the case, this seems a bit
 redundant.  In any event, the true situation needs to be clarified.
 
 -r
 -- 
 --
 http://www.cfcl.com/rdm
 email: rdm@cfcl.com
 phone: +1 650-873-7841
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102092120.f19LK4w20665>