libcdio 2.1.1
rock.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2005, 2006 2008, 2012 Rocky Bernstein <rocky@gnu.org>
3
4 See also rock.c by Eric Youngdale (1993) from GNU/Linux
5 This is Copyright 1993 Yggdrasil Computing, Incorporated
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
28
29#ifndef CDIO_ROCK_H_
30#define CDIO_ROCK_H_
31
32#include <cdio/types.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
66
67#define ISO_ROCK_IRUSR 000400
68#define ISO_ROCK_IWUSR 000200
69#define ISO_ROCK_IXUSR 000100
70#define ISO_ROCK_IRGRP 000040
71#define ISO_ROCK_IWGRP 000020
72#define ISO_ROCK_IXGRP 000010
73#define ISO_ROCK_IROTH 000004
74#define ISO_ROCK_IWOTH 000002
75#define ISO_ROCK_IXOTH 000001
77#define ISO_ROCK_ISUID 004000
78#define ISO_ROCK_ISGID 002000
79#define ISO_ROCK_ISVTX 001000
81#define ISO_ROCK_ISSOCK 0140000
82#define ISO_ROCK_ISLNK 0120000
83#define ISO_ROCK_ISREG 0100000
84#define ISO_ROCK_ISBLK 060000
85#define ISO_ROCK_ISCHR 020000
86#define ISO_ROCK_ISDIR 040000
87#define ISO_ROCK_ISFIFO 010000
90#define ISO_ROCK_ENFMT ISO_ROCK_ISGID
91
93
100typedef struct iso_su_sp_s{
101 uint8_t magic[2];
102 uint8_t skip;
104
113
119
131
146
154
155#define ISO_ROCK_SL_CONTINUE 1
156#define ISO_ROCK_SL_CURRENT 2
157#define ISO_ROCK_SL_PARENT 4
158#define ISO_ROCK_SL_ROOT 8
159
165
171
180
181#define ISO_ROCK_NM_CONTINUE 1
182#define ISO_ROCK_NM_CURRENT 2
183#define ISO_ROCK_NM_PARENT 4
184
185
190
195
200
212
213/* These are the bits and their meanings for flags in the TF structure. */
214#define ISO_ROCK_TF_CREATE 1
215#define ISO_ROCK_TF_MODIFY 2
216#define ISO_ROCK_TF_ACCESS 4
217#define ISO_ROCK_TF_ATTRIBUTES 8
218#define ISO_ROCK_TF_BACKUP 16
219#define ISO_ROCK_TF_EXPIRATION 32
220#define ISO_ROCK_TF_EFFECTIVE 64
221#define ISO_ROCK_TF_LONG_FORM 128
222
238
245
270
271/* Bits for the u_su_fields of iso_rock_statbuf_t */
272#define ISO_ROCK_SUF_SP 0x00000001
273#define ISO_ROCK_SUF_ER 0x00000002
274#define ISO_ROCK_SUF_CE 0x00000004
275#define ISO_ROCK_SUF_PX 0x00000008
276#define ISO_ROCK_SUF_PN 0x00000010
277#define ISO_ROCK_SUF_SL 0x00000020
278#define ISO_ROCK_SUF_NM 0x00000040
279#define ISO_ROCK_SUF_TF 0x00000080
280#define ISO_ROCK_SUF_CL 0x00000100
281#define ISO_ROCK_SUF_PL 0x00000200
282#define ISO_ROCK_SUF_RE 0x00000400
283#define ISO_ROCK_SUF_SF 0x00000800
284
285#define ISO_ROCK_SUF_FORMAL (ISO_ROCK_SUF_ER | ISO_ROCK_SUF_PX | ISO_ROCK_SUF_PN | \
286 ISO_ROCK_SUF_SL | ISO_ROCK_SUF_NM | ISO_ROCK_SUF_CL | \
287 ISO_ROCK_SUF_PL | ISO_ROCK_SUF_RE | ISO_ROCK_SUF_TF | \
288 ISO_ROCK_SUF_SF)
289
301
335
337
340 /*in*/ void * p_iso,
341 /*out*/ char * retname,
342 /*out*/ iso9660_stat_t *p_stat);
343
345 /*out*/ iso9660_stat_t *p_stat);
346
350 mode_t
352
387
395
396#ifdef __cplusplus
397}
398#endif /* __cplusplus */
399
400#endif /* CDIO_ROCK_H_ */
401
402/*
403 * Local variables:
404 * c-file-style: "gnu"
405 * tab-width: 8
406 * indent-tabs-mode: nil
407 * End:
408 */
uint64_t iso733_t
Definition iso9660.h:56
uint8_t iso711_t
ISO 9660 Integer and Character types.
Definition iso9660.h:49
#define EMPTY_ARRAY_SIZE
Definition iso9660.h:62
uint32_t posix_gid_t
Definition posix.h:29
uint32_t posix_mode_t
Definition posix.h:26
uint32_t posix_nlink_t
Definition posix.h:27
uint32_t posix_uid_t
Definition posix.h:28
struct iso_rock_cl_s iso_rock_cl_t
struct iso_rock_sl_part_s iso_rock_sl_part_t
struct iso_rock_px_s iso_rock_px_t
iso_rock_nm_flag_t iso_rock_nm_flag
#define ISO_ROCK_IWUSR
Definition rock.h:68
iso_rock_sl_flag_t iso_rock_sl_flag
mode_t iso9660_get_posix_filemode_from_rock(const iso_rock_statbuf_t *rr)
#define ISO_ROCK_ISCHR
Definition rock.h:85
PRAGMA_BEGIN_PACKED struct iso_su_sp_s iso_su_sp_t
#define ISO_ROCK_SL_CURRENT
Definition rock.h:156
#define ISO_ROCK_NM_CONTINUE
Definition rock.h:181
#define ISO_ROCK_SL_PARENT
Definition rock.h:157
#define ISO_ROCK_IRGRP
Definition rock.h:70
#define ISO_ROCK_ISREG
Definition rock.h:83
#define ISO_ROCK_ISSOCK
Definition rock.h:81
struct iso_rock_tf_s iso_rock_tf_t
#define ISO_ROCK_IWGRP
Definition rock.h:71
iso_rock_tf_flag_t
Definition rock.h:202
#define ISO_ROCK_IROTH
Definition rock.h:73
#define ISO_ROCK_TF_EFFECTIVE
Definition rock.h:220
iso_rock_enums
Definition rock.h:43
struct iso_rock_time_s iso_rock_time_t
#define ISO_ROCK_ISUID
Definition rock.h:77
#define ISO_ROCK_TF_ACCESS
Definition rock.h:216
#define ISO_ROCK_TF_LONG_FORM
Definition rock.h:221
PRAGMA_END_PACKED int get_rock_ridge_filename(iso9660_dir_t *de, void *p_iso, char *retname, iso9660_stat_t *p_stat)
iso_rock_nm_flag_t
Definition rock.h:175
#define ISO_ROCK_TF_BACKUP
Definition rock.h:218
struct iso_rock_pl_s iso_rock_pl_t
struct iso_su_ce_s iso_su_ce_t
struct iso_extension_record_s iso_extension_record_t
#define ISO_ROCK_IXGRP
Definition rock.h:72
iso_rock_tf_flag_t iso_rock_tf_flag
#define ISO_ROCK_IXUSR
Definition rock.h:69
struct iso_rock_sf_s iso_rock_sf_t
#define ISO_ROCK_ISGID
Definition rock.h:78
#define ISO_ROCK_IWOTH
Definition rock.h:74
#define ISO_ROCK_ISVTX
Definition rock.h:79
struct iso_rock_nm_s iso_rock_nm_t
#define ISO_ROCK_ISDIR
Definition rock.h:86
struct iso_rock_pn_s iso_rock_pn_t
#define ISO_ROCK_ISLNK
Definition rock.h:82
iso_rock_sl_flag_t
Definition rock.h:148
const char * iso9660_get_rock_attr_str(posix_mode_t st_mode)
#define ISO_ROCK_IRUSR
Definition rock.h:67
#define ISO_ROCK_ISFIFO
Definition rock.h:87
#define ISO_ROCK_NM_PARENT
Definition rock.h:183
#define ISO_ROCK_SL_CONTINUE
Definition rock.h:155
#define ISO_ROCK_IXOTH
Definition rock.h:75
#define ISO_ROCK_TF_CREATE
Definition rock.h:214
#define ISO_ROCK_NM_CURRENT
Definition rock.h:182
struct iso_su_er_s iso_su_er_t
struct iso_rock_sl_s iso_rock_sl_t
#define ISO_ROCK_TF_MODIFY
Definition rock.h:215
#define ISO_ROCK_ISBLK
Definition rock.h:84
#define ISO_ROCK_TF_EXPIRATION
Definition rock.h:219
int parse_rock_ridge_stat(iso9660_dir_t *de, iso9660_stat_t *p_stat)
struct iso_rock_statbuf_s iso_rock_statbuf_t
#define ISO_ROCK_SL_ROOT
Definition rock.h:158
#define ISO_ROCK_TF_ATTRIBUTES
Definition rock.h:217
Format of an ISO-9660 directory record.
Definition iso9660.h:250
ISO-9660 shorter-format time structure. See ECMA 9.1.5.
Definition iso9660.h:186
ISO-9660 longer-format time structure.
Definition iso9660.h:209
Unix stat-like version of iso9660_dir.
Definition iso9660.h:532
Definition rock.h:246
char signature[2]
Definition rock.h:247
iso_rock_nm_t NM
Definition rock.h:263
iso_rock_sf_t SF
Definition rock.h:267
iso_su_er_t ER
Definition rock.h:257
iso_su_sp_t SP
Definition rock.h:255
iso_su_ce_t CE
Definition rock.h:259
union iso_extension_record_s::@13 u
iso_rock_pn_t PN
Definition rock.h:261
iso_rock_cl_t CL
Definition rock.h:264
iso_rock_sl_t SL
Definition rock.h:262
iso_rock_pl_t PL
Definition rock.h:265
iso_rock_tf_t TF
Definition rock.h:266
iso_rock_px_t PX
Definition rock.h:260
iso711_t len
Definition rock.h:250
iso711_t version
Definition rock.h:253
Definition rock.h:192
iso733_t location
Definition rock.h:193
Definition rock.h:186
uint8_t flags
Definition rock.h:187
char name[EMPTY_ARRAY_SIZE]
Definition rock.h:188
Definition rock.h:197
iso733_t location
Definition rock.h:198
Definition rock.h:140
iso733_t dev_low
Definition rock.h:143
iso733_t dev_high
Definition rock.h:141
Definition rock.h:121
iso733_t st_gid
Definition rock.h:128
iso733_t st_uid
Definition rock.h:126
iso733_t st_nlinks
Definition rock.h:124
iso733_t st_mode
Definition rock.h:122
Definition rock.h:240
uint8_t table_depth
Definition rock.h:243
iso733_t virtual_size_low
Definition rock.h:242
iso733_t virtual_size_high
Definition rock.h:241
Definition rock.h:160
uint8_t flags
Definition rock.h:161
char text[EMPTY_ARRAY_SIZE]
Definition rock.h:163
uint8_t len
Definition rock.h:162
Definition rock.h:167
uint8_t flags
Definition rock.h:168
iso_rock_sl_part_t link
Definition rock.h:169
Definition rock.h:302
iso_rock_time_t effective
Definition rock.h:327
uint32_t u_su_fields
Definition rock.h:332
iso_rock_time_t access
Definition rock.h:320
uint8_t s_rock_offset
Definition rock.h:311
int i_symlink_max
Definition rock.h:313
posix_nlink_t st_nlinks
Definition rock.h:308
iso_rock_time_t create
Definition rock.h:316
int i_symlink
Definition rock.h:312
posix_mode_t st_mode
Definition rock.h:307
iso_rock_time_t backup
Definition rock.h:324
posix_uid_t st_uid
Definition rock.h:309
posix_gid_t st_gid
Definition rock.h:310
iso_rock_time_t attributes
Definition rock.h:322
uint32_t i_rdev
Definition rock.h:329
bool_3way_t b3_rock
Definition rock.h:303
char * psz_symlink
Definition rock.h:314
iso_rock_time_t expiration
Definition rock.h:325
iso_rock_time_t modify
Definition rock.h:317
Definition rock.h:224
uint8_t flags
Definition rock.h:225
uint8_t time_bytes[EMPTY_ARRAY_SIZE]
Definition rock.h:226
Definition rock.h:290
iso9660_ltime_t ltime
Definition rock.h:297
iso9660_dtime_t dtime
Definition rock.h:298
union iso_rock_time_s::@14 t
bool b_used
Definition rock.h:291
bool b_longdate
Definition rock.h:293
Definition rock.h:114
iso733_t offset
Definition rock.h:116
iso733_t size
Definition rock.h:117
iso733_t extent
Definition rock.h:115
Definition rock.h:106
uint8_t len_src
Definition rock.h:109
char data[EMPTY_ARRAY_SIZE]
Definition rock.h:111
uint8_t len_des
Definition rock.h:108
iso711_t len_id
Definition rock.h:107
iso711_t ext_ver
Definition rock.h:110
Definition rock.h:100
uint8_t skip
Definition rock.h:102
uint8_t magic[2]
Definition rock.h:101
Common type definitions used pervasively in libcdio.
bool_3way_t
Definition types.h:220
#define PRAGMA_BEGIN_PACKED
Definition types.h:152
#define PRAGMA_END_PACKED
Definition types.h:153
#define GNUC_PACKED
Definition types.h:132