1f9ab90drgrimes/*
2872b698pfg * SPDX-License-Identifier: BSD-3-Clause
3872b698pfg *
4f9ab90drgrimes *	The Regents of the University of California.  All rights reserved.
5f9ab90drgrimes *
6f9ab90drgrimes * Redistribution and use in source and binary forms, with or without
7f9ab90drgrimes * modification, are permitted provided that the following conditions
8f9ab90drgrimes * are met:
9f9ab90drgrimes * 1. Redistributions of source code must retain the above copyright
10f9ab90drgrimes *    notice, this list of conditions and the following disclaimer.
11f9ab90drgrimes * 2. Redistributions in binary form must reproduce the above copyright
12f9ab90drgrimes *    notice, this list of conditions and the following disclaimer in the
13f9ab90drgrimes *    documentation and/or other materials provided with the distribution.
147e6cabdimp * 3. Neither the name of the University nor the names of its contributors
15f9ab90drgrimes *    may be used to endorse or promote products derived from this software
16f9ab90drgrimes *    without specific prior written permission.
17f9ab90drgrimes *
18f9ab90drgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19f9ab90drgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20f9ab90drgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21f9ab90drgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22f9ab90drgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23f9ab90drgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24f9ab90drgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25f9ab90drgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26f9ab90drgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27f9ab90drgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28f9ab90drgrimes * SUCH DAMAGE.
29f9ab90drgrimes */
30d57ea32ken/*-
31d57ea32ken * Copyright (c) 2013, 2014, 2015 Spectra Logic Corporation
32d57ea32ken * All rights reserved.
33d57ea32ken *
34d57ea32ken * Redistribution and use in source and binary forms, with or without
35d57ea32ken * modification, are permitted provided that the following conditions
36d57ea32ken * are met:
37d57ea32ken * 1. Redistributions of source code must retain the above copyright
38d57ea32ken *    notice, this list of conditions, and the following disclaimer,
39d57ea32ken *    without modification.
40d57ea32ken * 2. Redistributions in binary form must reproduce at minimum a disclaimer
41d57ea32ken *    substantially similar to the "NO WARRANTY" disclaimer below
42d57ea32ken *    ("Disclaimer") and any redistribution must be conditioned upon
43d57ea32ken *    including a substantially similar Disclaimer requirement for further
44d57ea32ken *    binary redistribution.
45d57ea32ken *
46d57ea32ken * NO WARRANTY
47d57ea32ken * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
48d57ea32ken * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
49d57ea32ken * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
50d57ea32ken * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
51d57ea32ken * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52d57ea32ken * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
53d57ea32ken * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54d57ea32ken * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
55d57ea32ken * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
56d57ea32ken * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57d57ea32ken * POSSIBILITY OF SUCH DAMAGES.
58d57ea32ken *
59d57ea32ken * Authors: Ken Merry           (Spectra Logic Corporation)
60d57ea32ken */
61f9ab90drgrimes
62f9ab90drgrimes#ifndef lint
63ffd60e7charnierstatic const char copyright[] =
64f9ab90drgrimes"@(#) Copyright (c) 1980, 1993\n\
65f9ab90drgrimes	The Regents of the University of California.  All rights reserved.\n";
66f9ab90drgrimes#endif /* not lint */
67f9ab90drgrimes
68f9ab90drgrimes#ifndef lint
69ffd60e7charnier#if 0
70deba7dbpeterstatic char sccsid[] = "@(#)mt.c	8.2 (Berkeley) 5/4/95";
71ffd60e7charnier#endif
72f9ab90drgrimes#endif /* not lint */
73f9ab90drgrimes
742ae2046charnier#include <sys/cdefs.h>
752ae2046charnier__FBSDID("$FreeBSD$");
762ae2046charnier
77f9ab90drgrimes/*
78f9ab90drgrimes * mt --
79f9ab90drgrimes *   magnetic tape manipulation program
80f9ab90drgrimes */
81f9ab90drgrimes#include <sys/types.h>
82f9ab90drgrimes#include <sys/ioctl.h>
83f9ab90drgrimes#include <sys/mtio.h>
84