udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
options.c
Go to the documentation of this file.
1 /*
2 * options.c
3 *
4 * Copyright (c) 2001-2002 Ben Fennema <bfennema@falcon.csc.calpoly.edu>
5 * Copyright (c) 2014 Pali Rohár <pali.rohar@gmail.com>
6 * All rights reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 */
23
29 #include "config.h"
30
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <getopt.h>
34 #include <malloc.h>
35 #include <ctype.h>
36 #include <errno.h>
37
38 #include "mkudffs.h"
39 #include "defaults.h"
40 #include "options.h"
41
42 struct option long_options[] = {
43 { "help", no_argument, NULL, OPT_HELP },
44 { "label", required_argument, NULL, OPT_LABEL },
45 { "uuid", required_argument, NULL, OPT_UUID },
46 { "blocksize", required_argument, NULL, OPT_BLK_SIZE },
47 { "udfrev", required_argument, NULL, OPT_UDF_REV },
48 { "lvid", required_argument, NULL, OPT_LVID },
49 { "vid", required_argument, NULL, OPT_VID },
50 { "vsid", required_argument, NULL, OPT_VSID },
51 { "fsid", required_argument, NULL, OPT_FSID },
52 { "fullvsid", required_argument, NULL, OPT_FULLVSID },
53 { "uid", required_argument, NULL, OPT_UID },
54 { "gid", required_argument, NULL, OPT_GID },
55 { "strategy", required_argument, NULL, OPT_STRATEGY },
56 { "spartable", required_argument, NULL, OPT_SPARTABLE },
57 { "packetlen", required_argument, NULL, OPT_PACKETLEN },
58 { "media-type", required_argument, NULL, OPT_MEDIA_TYPE },
59 { "space", required_argument, NULL, OPT_SPACE },
60 { "ad", required_argument, NULL, OPT_AD },
61 { "noefe", no_argument, NULL, OPT_NO_EFE },
62 { "u8", no_argument, NULL, OPT_UNICODE8 },
63 { "u16", no_argument, NULL, OPT_UNICODE16 },
64 { "utf8", no_argument, NULL, OPT_UTF8 },
65 { "bridge", no_argument, NULL, OPT_BRIDGE },
66 { "closed", no_argument, NULL, OPT_CLOSED },
67 { 0, 0, NULL, 0 },
68 };
69
70 void usage(void)
71 {
72 fprintf(stderr, "mkudffs from " PACKAGE_NAME " " PACKAGE_VERSION "\n"
73 "Usage:\n"
74 "\tmkudffs [options] device [blocks-count]\n"
75 "Options:\n"
76 "\t--help, -h\n"
77 "\t--label=, -l\n"
78 "\t--uuid=, -u\n"
79 "\t--blocksize=, -b\n"
80 "\t--udfrev=, -r\n"
81 "\t--lvid=\n"
82 "\t--vid=\n"
83 "\t--vsid=\n"
84 "\t--fsid=\n"
85 "\t--fullvsid=\n"
86 "\t--uid=\n"
87 "\t--gid=\n"
88 "\t--strategy=\n"
89 "\t--spartable=\n"
90 "\t--packetlen=\n"
91 "\t--media-type=\n"
92 "\t--space=\n"
93 "\t--ad=\n"
94 "\t--noefe\n"
95 "\t--u8\n"
96 "\t--u16\n"
97 "\t--utf8\n"
98 "\t--bridge\n"
99 "\t--closed\n"
100 );
101 exit(1);
102 }
103
104 void parse_args(int argc, char *argv[], struct udf_disc *disc, char *device, int *blocksize)
105 {
106 int retval;
107 int i;
108 int media = DEFAULT_HD;
109 uint16_t packetlen = 0;
110 unsigned long int blocks = 0;
111 char *endptr = NULL;
112
113 while ((retval = getopt_long(argc, argv, "l:u:b:r:h", long_options, NULL)) != EOF)
114 {
115 switch (retval)
116 {
117 case OPT_HELP:
118 case 'h':
119 usage();
120 break;
121 case OPT_BLK_SIZE:
122 case 'b':
123 {
124 uint16_t bs;
125
126 disc->blocksize = strtoul(optarg, NULL, 0);
127 for (bs=512,disc->blocksize_bits=9;
128 disc->blocksize_bits<13;
129 disc->blocksize_bits++,bs<<=1)
130 {
131 if (disc->blocksize == bs)
132 break;
133 }
134 if (disc->blocksize_bits == 13)
135 {
136 fprintf(stderr, "mkudffs: invalid blocksize\n");
137 exit(1);
138 }
139 disc->udf_lvd[0]->logicalBlockSize = cpu_to_le32(disc->blocksize);
140 *blocksize = disc->blocksize;
141 break;
142 }
143 case OPT_UDF_REV:
144 case 'r':
145 {
146 if (udf_set_version(disc, strtoul(optarg, NULL, 16)))
147 {
148 fprintf(stderr, "mkudffs: invalid udf revision\n");
149 exit(1);
150 }
151 break;
152 }
153 case OPT_NO_EFE:
154 {
155 disc->flags &= ~FLAG_EFE;
156 break;
157 }
158 case OPT_UNICODE8:
159 {
160 disc->flags &= ~FLAG_CHARSET;
161 disc->flags |= FLAG_UNICODE8;
162 if (strcmp(argv[1], "--u8") != 0)
163 {
164 fprintf(stderr, "mkudffs: Option --u8 must be specified as first argument\n");
165 exit(1);
166 }
167 break;
168 }
169 case OPT_UNICODE16:
170 {
171 disc->flags &= ~FLAG_CHARSET;
172 disc->flags |= FLAG_UNICODE16;
173 if (strcmp(argv[1], "--u16") != 0)
174 {
175 fprintf(stderr, "mkudffs: Option --u16 must be specified as first argument\n");
176 exit(1);
177 }
178 break;
179 }
180 case OPT_UTF8:
181 {
182 disc->flags &= ~FLAG_CHARSET;
183 disc->flags |= FLAG_UTF8;
184 if (strcmp(argv[1], "--utf8") != 0)
185 {
186 fprintf(stderr, "mkudffs: Option --utf8 must be specified as first argument\n");
187 exit(1);
188 }
189 break;
190 }
191 case OPT_BRIDGE:
192 {
193 disc->flags |= FLAG_BRIDGE;
194 break;
195 }
196 case OPT_CLOSED:
197 {
198 disc->flags |= FLAG_CLOSED;
199 break;
200 }
201 case OPT_LVID:
202 case OPT_VID:
203 case OPT_LABEL:
204 case 'l':
205 {
206 if (retval != OPT_VID)
207 {
208 disc->udf_lvd[0]->logicalVolIdent[127] = encode_string(disc, disc->udf_lvd[0]->logicalVolIdent, "", optarg, 128);
209 ((struct impUseVolDescImpUse *)disc->udf_iuvd[0]->impUse)->logicalVolIdent[127] = encode_string(disc, ((struct impUseVolDescImpUse *)disc->udf_iuvd[0]->impUse)->logicalVolIdent, "", optarg, 128);
210 disc->udf_fsd->logicalVolIdent[127] = encode_string(disc, disc->udf_fsd->logicalVolIdent, "", optarg, 128);
211 if (!disc->udf_fsd->logicalVolIdent[127])
212 {
213 fprintf(stderr, "mkudffs: Error: lvid option is too long\n");
214 exit(1);
215 }
216 }
217 if (retval != OPT_LVID)
218 {
219 disc->udf_pvd[0]->volIdent[31] = encode_string(disc, disc->udf_pvd[0]->volIdent, "", optarg, 32);
220 if (!disc->udf_pvd[0]->volIdent[31])
221 {
222 fprintf(stderr, "mkudffs: Error: vid option is too long\n");
223 exit(1);
224 }
225 }
226 break;
227 }
228 case OPT_VSID:
229 {
230 char ts[17];
231 if (disc->udf_pvd[0]->volSetIdent[0] == 16)
232 for (i = 0; i < 16; ++i)
233 ts[i] = disc->udf_pvd[0]->volSetIdent[2+(i*2)];
234 else
235 strncpy(ts, (char *)&disc->udf_pvd[0]->volSetIdent[1], 16);
236 ts[16] = 0;
237 disc->udf_pvd[0]->volSetIdent[127] = encode_string(disc, disc->udf_pvd[0]->volSetIdent, ts, optarg, 128);
238 if (!disc->udf_pvd[0]->volSetIdent[127])
239 {
240 fprintf(stderr, "mkudffs: Error: vsid option is too long\n");
241 exit(1);
242 }
243 break;
244 }
245 case OPT_UUID:
246 case 'u':
247 {
248 char ts[110];
249 if (strlen(optarg) != 16)
250 {
251 fprintf(stderr, "mkudffs: Error: uuid is not 16 bytes length\n");
252 exit(1);
253 }
254 for (i = 0; i < 16; ++i)
255 {
256 if (!isalnum(optarg[i]))
257 {
258 fprintf(stderr, "mkudffs: Error: uuid is not alphanumeric\n");
259 exit(1);
260 }
261 }
262 strncpy(ts, (char *)&disc->udf_pvd[0]->volSetIdent[17], 109);
263 ts[109] = 0;
264 disc->udf_pvd[0]->volSetIdent[127] = encode_string(disc, disc->udf_pvd[0]->volSetIdent, optarg, ts, 128);
265 if (!disc->udf_pvd[0]->volSetIdent[127])
266 {
267 fprintf(stderr, "mkudffs: Error: vsid option is too long\n");
268 exit(1);
269 }
270 break;
271 }
272 case OPT_FULLVSID:
273 {
274 disc->udf_pvd[0]->volSetIdent[127] = encode_string(disc, disc->udf_pvd[0]->volSetIdent, "", optarg, 128);
275 if (!disc->udf_pvd[0]->volSetIdent[127])
276 {
277 fprintf(stderr, "mkudffs: Error: fullvsid option is too long\n");
278 exit(1);
279 }
280 break;
281 }
282 case OPT_FSID:
283 {
284 disc->udf_fsd->fileSetIdent[31] = encode_string(disc, disc->udf_fsd->fileSetIdent, "", optarg, 32);
285 if (!disc->udf_fsd->fileSetIdent[31])
286 {
287 fprintf(stderr, "mkudffs: Error: fsid option is too long\n");
288 exit(1);
289 }
290 break;
291 }
292 case OPT_UID:
293 {
294 disc->uid = strtol(optarg, NULL, 0);
295 break;
296 }
297 case OPT_GID:
298 {
299 disc->gid = strtol(optarg, NULL, 0);
300 break;
301 }
302 case OPT_STRATEGY:
303 {
304 uint16_t strategy;
305
306 strategy = strtoul(optarg, NULL, 0);
307 if (strategy == 4096)
308 disc->flags |= FLAG_STRATEGY4096;
309 else if (strategy != 4)
310 {
311 fprintf(stderr, "mkudffs: invalid strategy type\n");
312 exit(1);
313 }
314 break;
315 }
316 case OPT_SPARTABLE:
317 {
318 uint8_t spartable;
319
320 spartable = strtoul(optarg, NULL, 0);
321 if (spartable > 4)
322 {
323 fprintf(stderr, "mkudffs: invalid spartable count\n");
324 exit(1);
325 }
326 add_type2_sparable_partition(disc, 0, spartable, packetlen);
327 media = DEFAULT_CDRW;
328 break;
329 }
330 case OPT_PACKETLEN:
331 {
332 struct sparablePartitionMap *spm;
333
334 packetlen = strtoul(optarg, NULL, 0);
335 if ((spm = find_type2_sparable_partition(disc, 0)))
336 spm->packetLength = cpu_to_le16(packetlen);
337 break;
338 }
339 case OPT_MEDIA_TYPE:
340 {
341 if (!strncmp(optarg, "hd", 2))
342 media = DEFAULT_HD;
343 else if (!strcmp(optarg, "dvd"))
344 {
345 disc->udf_pd[0]->accessType = cpu_to_le32(PD_ACCESS_TYPE_READ_ONLY);
346 media = DEFAULT_DVD;
347 }
348 else if (!strncmp(optarg, "dvdram", 6))
349 {
350 disc->udf_pd[0]->accessType = cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE);
351 media = DEFAULT_DVDRAM;
352 }
353 else if (!strncmp(optarg, "dvdrw", 5))
354 {
355 disc->udf_pd[0]->accessType = cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE);
356 media = DEFAULT_DVDRW;
357 packetlen = 16;
358 }
359 else if (!strncmp(optarg, "worm", 4))
360 {
361 disc->udf_pd[0]->accessType = cpu_to_le32(PD_ACCESS_TYPE_WRITE_ONCE);
362 media = DEFAULT_WORM;
363 disc->flags |= (FLAG_STRATEGY4096 | FLAG_BLANK_TERMINAL);
364 }
365 else if (!strncmp(optarg, "mo", 2))
366 {
367 disc->udf_pd[0]->accessType = cpu_to_le32(PD_ACCESS_TYPE_REWRITABLE);
368 media = DEFAULT_MO;
369 disc->flags |= (FLAG_STRATEGY4096 | FLAG_BLANK_TERMINAL);
370 }
371 else if (!strncmp(optarg, "cdrw", 4))
372 {
373 disc->udf_pd[0]->accessType = cpu_to_le32(PD_ACCESS_TYPE_REWRITABLE);
374 media = DEFAULT_CDRW;
375 }
376 else if (!strncmp(optarg, "cdr", 3))
377 {
378 disc->udf_pd[0]->accessType = cpu_to_le32(PD_ACCESS_TYPE_WRITE_ONCE);
379 media = DEFAULT_CDR;
380 disc->flags |= FLAG_VAT;
381 disc->flags &= ~FLAG_CLOSED;
382 }
383 else
384 {
385 fprintf(stderr, "mkudffs: invalid media type\n");
386 exit(1);
387 }
388 break;
389 }
390 case OPT_SPACE:
391 {
392 if (!strncmp(optarg, "freedbitmap", 11))
393 disc->flags |= FLAG_FREED_BITMAP;
394 else if (!strncmp(optarg, "freedtable", 10))
395 disc->flags |= FLAG_FREED_TABLE;
396 else if (!strncmp(optarg, "unallocbitmap", 13))
397 disc->flags |= FLAG_UNALLOC_BITMAP;
398 else if (!strncmp(optarg, "unalloctable", 12))
399 disc->flags |= FLAG_UNALLOC_TABLE;
400 else
401 {
402 fprintf(stderr, "mkudffs: invalid space type\n");
403 exit(1);
404 }
405 break;
406 }
407 case OPT_AD:
408 {
409 if (!strncmp(optarg, "inicb", 5))
410 {
411 default_fe.icbTag.flags = cpu_to_le16(ICBTAG_FLAG_AD_IN_ICB);
412 default_efe.icbTag.flags = cpu_to_le16(ICBTAG_FLAG_AD_IN_ICB);
413 }
414 else if (!strncmp(optarg, "short", 5))
415 {
416 default_fe.icbTag.flags = cpu_to_le16(ICBTAG_FLAG_AD_SHORT);
417 default_efe.icbTag.flags = cpu_to_le16(ICBTAG_FLAG_AD_SHORT);
418 }
419 else if (!strncmp(optarg, "long", 4))
420 {
421 default_fe.icbTag.flags = cpu_to_le16(ICBTAG_FLAG_AD_LONG);
422 default_efe.icbTag.flags = cpu_to_le16(ICBTAG_FLAG_AD_LONG);
423 }
424 else
425 {
426 fprintf(stderr, "mkudffs: invalid allocation descriptor\n");
427 exit(1);
428 }
429 break;
430 }
431 default:
432 exit(1);
433 }
434 }
435 if (optind == argc)
436 usage();
437 strncpy(device, argv[optind], NAME_MAX-1);
438 device[NAME_MAX-1] = '\0';
439 optind ++;
440 if (optind < argc)
441 {
442 errno = 0;
443 blocks = strtoul(argv[optind++], &endptr, 0);
444 if (errno || *endptr || blocks > UINT32_MAX)
445 {
446 fprintf(stderr, "mkudffs: invalid block-count\n");
447 exit(1);
448 }
449 disc->head->blocks = blocks;
450 }
451 if (optind < argc)
452 usage();
453
454 if (le32_to_cpu(disc->udf_lvd[0]->numPartitionMaps) == 0)
455 {
456 if ((media == DEFAULT_CDRW || media == DEFAULT_DVDRW) && (disc->udf_rev != 0x0102))
457 add_type2_sparable_partition(disc, 0, 2, packetlen);
458 else if ((media == DEFAULT_CDR) && (disc->udf_rev != 0x0102))
459 {
460 add_type1_partition(disc, 0);
461 add_type2_virtual_partition(disc, 0);
462 }
463 else
464 add_type1_partition(disc, 0);
465 }
466
467 if (!(disc->flags & FLAG_SPACE))
468 disc->flags |= FLAG_UNALLOC_BITMAP;
469
470 if (media == DEFAULT_CDR)
471 disc->flags &= ~FLAG_SPACE;
472
473 for (i=0; i<UDF_ALLOC_TYPE_SIZE; i++)
474 {
475 if (disc->sizing[i].denomSize == 0)
476 disc->sizing[i] = default_sizing[media][i];
477 }
478 }
device
int device
Definition: wrudf.c:18
udf_extent::blocks
uint32_t blocks
Definition: libudffs.h:135
PD_ACCESS_TYPE_REWRITABLE
#define PD_ACCESS_TYPE_REWRITABLE
Definition: ecma_167.h:292
extendedFileEntry::icbTag
icbtag icbTag
Definition: ecma_167.h:801
FLAG_BRIDGE
#define FLAG_BRIDGE
Definition: libudffs.h:53
DEFAULT_DVD
#define DEFAULT_DVD
Definition: mkudffs.h:35
FLAG_CLOSED
#define FLAG_CLOSED
Definition: libudffs.h:54
OPT_UUID
#define OPT_UUID
Definition: options.h:57
add_type2_virtual_partition
void add_type2_virtual_partition(struct udf_disc *disc, uint16_t partitionNum)
Definition: mkudffs.c:1115
cpu_to_le32
#define cpu_to_le32(x)
Definition: bswap.h:247
FLAG_BLANK_TERMINAL
#define FLAG_BLANK_TERMINAL
Definition: libudffs.h:51
udf_disc::blocksize
uint16_t blocksize
Definition: libudffs.h:98
fileEntry::icbTag
icbtag icbTag
Definition: ecma_167.h:561
logicalVolDesc::logicalBlockSize
uint32_t logicalBlockSize
Definition: ecma_167.h:302
udf_disc::udf_pd
struct partitionDesc * udf_pd[2]
Definition: libudffs.h:114
FLAG_EFE
#define FLAG_EFE
Definition: libudffs.h:43
fileSetDesc::fileSetIdent
dstring fileSetIdent[32]
Definition: ecma_167.h:438
NAME_MAX
#define NAME_MAX
Definition: cdrwtool.h:57
DEFAULT_DVDRW
#define DEFAULT_DVDRW
Definition: mkudffs.h:41
OPT_LVID
#define OPT_LVID
Definition: options.h:46
sparablePartitionMap
Definition: osta_udf.h:141
mkudffs.h
PD_ACCESS_TYPE_WRITE_ONCE
#define PD_ACCESS_TYPE_WRITE_ONCE
Definition: ecma_167.h:291
FLAG_UNALLOC_TABLE
#define FLAG_UNALLOC_TABLE
Definition: libudffs.h:38
OPT_GID
#define OPT_GID
Definition: options.h:60
udf_disc::udf_pvd
struct primaryVolDesc * udf_pvd[2]
Definition: libudffs.h:112
options.h
FLAG_UNALLOC_BITMAP
#define FLAG_UNALLOC_BITMAP
Definition: libudffs.h:37
udf_disc::uid
uint32_t uid
Definition: libudffs.h:102
udf_disc::head
struct udf_extent * head
Definition: libudffs.h:127
impUseVolDescImpUse
Definition: osta_udf.h:107
OPT_UNICODE8
#define OPT_UNICODE8
Definition: options.h:38
cpu_to_le16
#define cpu_to_le16(x)
Definition: bswap.h:246
default_fe
struct fileEntry default_fe
Definition: defaults.c:429
OPT_VSID
#define OPT_VSID
Definition: options.h:48
FLAG_FREED_TABLE
#define FLAG_FREED_TABLE
Definition: libudffs.h:36
OPT_SPACE
#define OPT_SPACE
Definition: options.h:54
encode_string
size_t encode_string(struct udf_disc *, dstring *, char *, char *, size_t)
Definition: unicode.c:191
OPT_MEDIA_TYPE
#define OPT_MEDIA_TYPE
Definition: options.h:53
fileSetDesc::logicalVolIdent
dstring logicalVolIdent[128]
Definition: ecma_167.h:436
OPT_FULLVSID
#define OPT_FULLVSID
Definition: options.h:58
sparablePartitionMap::packetLength
uint16_t packetLength
Definition: osta_udf.h:149
OPT_FSID
#define OPT_FSID
Definition: options.h:49
OPT_NO_EFE
#define OPT_NO_EFE
Definition: options.h:37
DEFAULT_CDR
#define DEFAULT_CDR
Definition: mkudffs.h:40
DEFAULT_WORM
#define DEFAULT_WORM
Definition: mkudffs.h:37
ICBTAG_FLAG_AD_SHORT
#define ICBTAG_FLAG_AD_SHORT
Definition: ecma_167.h:526
primaryVolDesc::volSetIdent
dstring volSetIdent[128]
Definition: ecma_167.h:215
FLAG_CHARSET
#define FLAG_CHARSET
Definition: libudffs.h:48
primaryVolDesc::volIdent
dstring volIdent[32]
Definition: ecma_167.h:208
ICBTAG_FLAG_AD_LONG
#define ICBTAG_FLAG_AD_LONG
Definition: ecma_167.h:527
OPT_UID
#define OPT_UID
Definition: options.h:59
FLAG_FREED_BITMAP
#define FLAG_FREED_BITMAP
Definition: libudffs.h:35
FLAG_UNICODE8
#define FLAG_UNICODE8
Definition: libudffs.h:45
udf_sizing::denomSize
uint32_t denomSize
Definition: libudffs.h:81
FLAG_UTF8
#define FLAG_UTF8
Definition: libudffs.h:47
udf_disc::sizing
struct udf_sizing sizing[UDF_ALLOC_TYPE_SIZE]
Definition: libudffs.h:105
OPT_SPARTABLE
#define OPT_SPARTABLE
Definition: options.h:51
FLAG_SPACE
#define FLAG_SPACE
Definition: libudffs.h:41
OPT_UDF_REV
#define OPT_UDF_REV
Definition: options.h:45
DEFAULT_CDRW
#define DEFAULT_CDRW
Definition: mkudffs.h:39
PD_ACCESS_TYPE_OVERWRITABLE
#define PD_ACCESS_TYPE_OVERWRITABLE
Definition: ecma_167.h:293
udf_disc::gid
uint32_t gid
Definition: libudffs.h:103
udf_set_version
int udf_set_version(struct udf_disc *, int)
Definition: mkudffs.c:152
OPT_VID
#define OPT_VID
Definition: options.h:47
long_options
struct option long_options[]
Definition: options.c:33
OPT_STRATEGY
#define OPT_STRATEGY
Definition: options.h:50
PD_ACCESS_TYPE_READ_ONLY
#define PD_ACCESS_TYPE_READ_ONLY
Definition: ecma_167.h:290
default_sizing
struct udf_sizing default_sizing[][UDF_ALLOC_TYPE_SIZE]
Definition: defaults.c:32
logicalVolDesc::logicalVolIdent
dstring logicalVolIdent[128]
Definition: ecma_167.h:301
OPT_AD
#define OPT_AD
Definition: options.h:55
logicalVolDesc::numPartitionMaps
uint32_t numPartitionMaps
Definition: ecma_167.h:306
udf_disc::flags
uint32_t flags
Definition: libudffs.h:100
add_type1_partition
void add_type1_partition(struct udf_disc *disc, uint16_t partitionNum)
Definition: mkudffs.c:1019
parse_args
void parse_args(int argc, char *argv[], struct cdrw_disc *disc, char *device)
Definition: options.c:69
OPT_PACKETLEN
#define OPT_PACKETLEN
Definition: options.h:52
udf_disc
Definition: libudffs.h:95
OPT_CLOSED
#define OPT_CLOSED
Definition: options.h:42
OPT_HELP
#define OPT_HELP
Definition: options.h:38
default_efe
struct extendedFileEntry default_efe
Definition: defaults.c:462
partitionDesc::accessType
uint32_t accessType
Definition: ecma_167.h:268
find_type2_sparable_partition
struct sparablePartitionMap * find_type2_sparable_partition(struct udf_disc *disc, uint16_t partitionNum)
Definition: mkudffs.c:1088
usage
void usage(void)
Definition: options.c:56
ICBTAG_FLAG_AD_IN_ICB
#define ICBTAG_FLAG_AD_IN_ICB
Definition: ecma_167.h:529
OPT_UNICODE16
#define OPT_UNICODE16
Definition: options.h:39
impUseVolDesc::impUse
uint8_t impUse[460]
Definition: ecma_167.h:256
add_type2_sparable_partition
void add_type2_sparable_partition(struct udf_disc *disc, uint16_t partitionNum, uint8_t spartable, uint16_t packetlen)
Definition: mkudffs.c:1052
udf_disc::blocksize_bits
uint8_t blocksize_bits
Definition: libudffs.h:99
udf_disc::udf_rev
uint16_t udf_rev
Definition: libudffs.h:97
UDF_ALLOC_TYPE_SIZE
Definition: libudffs.h:92
FLAG_UNICODE16
#define FLAG_UNICODE16
Definition: libudffs.h:46
OPT_UTF8
#define OPT_UTF8
Definition: options.h:40
OPT_BRIDGE
#define OPT_BRIDGE
Definition: options.h:41
udf_disc::udf_fsd
struct fileSetDesc * udf_fsd
Definition: libudffs.h:125
FLAG_VAT
#define FLAG_VAT
Definition: libudffs.h:55
udf_disc::udf_lvd
struct logicalVolDesc * udf_lvd[2]
Definition: libudffs.h:113
FLAG_STRATEGY4096
#define FLAG_STRATEGY4096
Definition: libudffs.h:50
DEFAULT_MO
#define DEFAULT_MO
Definition: mkudffs.h:38
OPT_LABEL
#define OPT_LABEL
Definition: options.h:56
udf_disc::udf_iuvd
struct impUseVolDesc * udf_iuvd[2]
Definition: libudffs.h:116
OPT_BLK_SIZE
#define OPT_BLK_SIZE
Definition: options.h:44
DEFAULT_HD
#define DEFAULT_HD
Definition: mkudffs.h:34
DEFAULT_DVDRAM
#define DEFAULT_DVDRAM
Definition: mkudffs.h:36
defaults.h