]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/fs/cd9660/cd9660_rrip.h
devfs: add integrity asserts for cdevp_list
[FreeBSD/FreeBSD.git] / sys / fs / cd9660 / cd9660_rrip.h
1 /*-
2  * SPDX-License-Identifier: BSD-3-Clause
3  *
4  * Copyright (c) 1993, 1994
5  *      The Regents of the University of California.  All rights reserved.
6  *
7  * This code is derived from software contributed to Berkeley
8  * by Pace Willisson (pace@blitz.com).  The Rock Ridge Extension
9  * Support code is derived from software contributed to Berkeley
10  * by Atsushi Murai (amurai@spec.co.jp).
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in the
19  *    documentation and/or other materials provided with the distribution.
20  * 3. Neither the name of the University nor the names of its contributors
21  *    may be used to endorse or promote products derived from this software
22  *    without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34  * SUCH DAMAGE.
35  *
36  *      @(#)cd9660_rrip.h       8.2 (Berkeley) 12/5/94
37  */
38
39 #ifndef _ISOFS_CD9660_CD9660_RRIP_H_
40 #define _ISOFS_CD9660_CD9660_RRIP_H_
41
42 typedef struct {
43         char   type                     [ISODCL (  0,    1)];
44         u_char length                   [ISODCL (  2,    2)]; /* 711 */
45         u_char version                  [ISODCL (  3,    3)];
46 } ISO_SUSP_HEADER;
47
48 typedef struct {
49         ISO_SUSP_HEADER                 h;
50         char mode                       [ISODCL (  4,   11)]; /* 733 */
51         char links                      [ISODCL ( 12,   19)]; /* 733 */
52         char uid                        [ISODCL ( 20,   27)]; /* 733 */
53         char gid                        [ISODCL ( 28,   35)]; /* 733 */
54 } ISO_RRIP_ATTR;
55
56 typedef struct {
57         ISO_SUSP_HEADER                 h;
58         char dev_t_high                 [ISODCL (  4,   11)]; /* 733 */
59         char dev_t_low                  [ISODCL ( 12,   19)]; /* 733 */
60 } ISO_RRIP_DEVICE;
61
62 #define ISO_SUSP_CFLAG_CONTINUE 0x01
63 #define ISO_SUSP_CFLAG_CURRENT  0x02
64 #define ISO_SUSP_CFLAG_PARENT   0x04
65 #define ISO_SUSP_CFLAG_ROOT     0x08
66 #define ISO_SUSP_CFLAG_VOLROOT  0x10
67 #define ISO_SUSP_CFLAG_HOST     0x20
68
69 typedef struct {
70         u_char cflag                    [ISODCL (  1,    1)];
71         u_char clen                     [ISODCL (  2,    2)];
72         u_char name                     [1];                    /* XXX */
73 } ISO_RRIP_SLINK_COMPONENT;
74 #define ISO_RRIP_SLSIZ  2
75
76 typedef struct {
77         ISO_SUSP_HEADER                 h;
78         u_char flags                    [ISODCL (  4,    4)];
79         u_char component                [ISODCL (  5,    5)];
80 } ISO_RRIP_SLINK;
81
82 typedef struct {
83         ISO_SUSP_HEADER                 h;
84         char flags                      [ISODCL (  4,    4)];
85 } ISO_RRIP_ALTNAME;
86
87 typedef struct {
88         ISO_SUSP_HEADER                 h;
89         char dir_loc                    [ISODCL (  4,    11)]; /* 733 */
90 } ISO_RRIP_CLINK;
91
92 typedef struct {
93         ISO_SUSP_HEADER                 h;
94         char dir_loc                    [ISODCL (  4,    11)]; /* 733 */
95 } ISO_RRIP_PLINK;
96
97 typedef struct {
98         ISO_SUSP_HEADER                 h;
99 } ISO_RRIP_RELDIR;
100
101 #define ISO_SUSP_TSTAMP_FORM17  0x80
102 #define ISO_SUSP_TSTAMP_FORM7   0x00
103 #define ISO_SUSP_TSTAMP_CREAT   0x01
104 #define ISO_SUSP_TSTAMP_MODIFY  0x02
105 #define ISO_SUSP_TSTAMP_ACCESS  0x04
106 #define ISO_SUSP_TSTAMP_ATTR    0x08
107 #define ISO_SUSP_TSTAMP_BACKUP  0x10
108 #define ISO_SUSP_TSTAMP_EXPIRE  0x20
109 #define ISO_SUSP_TSTAMP_EFFECT  0x40
110
111 typedef struct {
112         ISO_SUSP_HEADER                 h;
113         u_char flags                    [ISODCL (  4,    4)];
114         u_char time                     [ISODCL (  5,    5)];
115 } ISO_RRIP_TSTAMP;
116
117 typedef struct {
118         ISO_SUSP_HEADER                 h;
119         u_char flags                    [ISODCL (  4,    4)];
120 } ISO_RRIP_IDFLAG;
121
122 typedef struct {
123         ISO_SUSP_HEADER                 h;
124         char len_id                     [ISODCL (  4,    4)];
125         char len_des                    [ISODCL (  5,    5)];
126         char len_src                    [ISODCL (  6,    6)];
127         char version                    [ISODCL (  7,    7)];
128 } ISO_RRIP_EXTREF;
129
130 typedef struct {
131         ISO_SUSP_HEADER                 h;
132         char check                      [ISODCL (  4,    5)];
133         char skip                       [ISODCL (  6,    6)];
134 } ISO_RRIP_OFFSET;
135
136 typedef struct {
137         ISO_SUSP_HEADER                 h;
138         u_char location                 [ISODCL (  4,   11)];
139         u_char offset                   [ISODCL ( 12,   19)];
140         u_char length                   [ISODCL ( 20,   27)];
141 } ISO_RRIP_CONT;
142
143 #endif /* _ISOFS_CD9660_CD9660_RRIP_H_ */