Mailinglist Archive: packet-writing (84 mails)
| < Previous | Next > |
Re: New cdrwtool (trying to format too many blocks)
- From: Ben Fennema <bfennema@xxxxxxxxxxxxx>
- Date: Tue, 5 Feb 2002 07:46:51 +0000 (UTC)
- Message-id: <20020204234835.A5248@xxxxxxxxxxxxxxxxxxxxxxxxxx>
On Tue, Feb 05, 2002 at 08:26:46AM +0100, Norbert Preining wrote:
> On Mon, 04 Feb 2002, Ben Fennema wrote:
> > -q runs mkudffs, and happens to default to udf 2.01 and not 1.5 which is
> > most likely why windows can't read the disc. I just added a flag yesterday
> > to set the udf version under cdrwtool - so the current version has no way
> > to change to 1.5, without mounting via pktsetup and running mkudffs directly
> > on /dev/pktcdvd0..
>
> What are the options necessary to call mkudffs the same way besides rev 1.5
> from the commandline: I tried
> mkudffs -r0x0150 /dev/pktcdvd0
> (after reading the source to find how to give the revision) and I got
>
> [root: ~] mkudffs -r0x0150 /dev/pktcdvd0
> trying to change type of multiple extents
It's probably not getting the # of blocks right.. specifying it explicitly should
work. mkudffs -r0x0150 /dev/pktcdvd0 <# blocks>
If not, attached is a patch to cdrwtool.. -v <version> (-r is already taken)
diff -u -p -r1.2 options.c
--- options.c 2002/01/30 21:39:59 1.2
+++ options.c 2002/02/05 07:40:03
@@ -36,7 +36,8 @@ struct option long_options[] = {
{ "get write parameters", no_argument, NULL, 'g' },
{ "blank cdrw disc", 1, NULL, 'b' },
{ "format cdrw disc", 1,NULL, 'm' },
- { "run mkudf on track", 1,NULL, 'u' },
+ { "run mkudffs on track", 1, NULL, 'u' },
+ { "set mkudffs version", 1, NULL, 'v' },
{ "set cd writing speed", 1, NULL, 't' },
{ "write fixed packets", 1, NULL, 'p' },
{ "perform quick setup", no_argument, NULL, 'q' },
@@ -67,7 +68,7 @@ void parse_args(int argc, char *argv[],
{
int retval;
- while ((retval = getopt_long(argc, argv, "r:t:im:u:d:sgqcb:p:z:l:w:f:o:h", long_options, NULL)) != EOF)
+ while ((retval = getopt_long(argc, argv, "r:t:im:u:v:d:sgqcb:p:z:l:w:f:o:h", long_options, NULL)) != EOF)
{
switch (retval)
{
@@ -90,6 +91,34 @@ void parse_args(int argc, char *argv[],
disc->mkudf = 1;
disc->offset = strtol(optarg, NULL, 10);
printf("mkudfing %lu blocks\n", disc->offset);
+ break;
+ }
+ case 'v':
+ {
+ struct logicalVolIntegrityDescImpUse *lvidiu;
+
+ disc->udf_disc.udf_rev = strtol(optarg, NULL, 16);
+ if (disc->udf_disc.udf_rev != 0x0102 &&
+ disc->udf_disc.udf_rev != 0x0150 &&
+ disc->udf_disc.udf_rev != 0x0200 &&
+ disc->udf_disc.udf_rev != 0x0201)
+ {
+ exit(1);
+ }
+ printf("udf version set to 0x%04x\n", disc->udf_disc.udf_rev);
+ if (disc->udf_disc.udf_rev < 0x0200)
+ {
+ disc->udf_disc.flags &= ~FLAG_EFE;
+ strcpy(disc->udf_disc.udf_pd[0]->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02);
+ }
+ ((uint16_t *)disc->udf_disc.udf_fsd->domainIdent.identSuffix)[0] = cpu_to_le16(disc->udf_disc.udf_rev);
+ ((uint16_t *)disc->udf_disc.udf_lvd[0]->domainIdent.identSuffix)[0] = cpu_to_le16(disc->udf_disc.udf_rev);
+ ((uint16_t *)disc->udf_disc.udf_iuvd[0]->impIdent.identSuffix)[0] = le16_to_cpu(disc->udf_disc.udf_rev);
+ lvidiu = (struct logicalVolIntegrityDescImpUse *)&(disc->udf_disc.udf_lvid->impUse[le32_to_cpu(disc->udf_disc.udf_lvd[0]->numPartitionMaps) * 2 * sizeof(uint32_t)]);
+ lvidiu->minUDFReadRev = le16_to_cpu(disc->udf_disc.udf_rev);
+ lvidiu->minUDFWriteRev = le16_to_cpu(disc->udf_disc.udf_rev);
+ lvidiu->maxUDFWriteRev = le16_to_cpu(disc->udf_disc.udf_rev);
+ ((uint16_t *)disc->udf_disc.udf_stable[0]->sparingIdent.identSuffix)[0] = le16_to_cpu(disc->udf_disc.udf_rev);
break;
}
case 'r':
> On Mon, 04 Feb 2002, Ben Fennema wrote:
> > -q runs mkudffs, and happens to default to udf 2.01 and not 1.5 which is
> > most likely why windows can't read the disc. I just added a flag yesterday
> > to set the udf version under cdrwtool - so the current version has no way
> > to change to 1.5, without mounting via pktsetup and running mkudffs directly
> > on /dev/pktcdvd0..
>
> What are the options necessary to call mkudffs the same way besides rev 1.5
> from the commandline: I tried
> mkudffs -r0x0150 /dev/pktcdvd0
> (after reading the source to find how to give the revision) and I got
>
> [root: ~] mkudffs -r0x0150 /dev/pktcdvd0
> trying to change type of multiple extents
It's probably not getting the # of blocks right.. specifying it explicitly should
work. mkudffs -r0x0150 /dev/pktcdvd0 <# blocks>
If not, attached is a patch to cdrwtool.. -v <version> (-r is already taken)
diff -u -p -r1.2 options.c
--- options.c 2002/01/30 21:39:59 1.2
+++ options.c 2002/02/05 07:40:03
@@ -36,7 +36,8 @@ struct option long_options[] = {
{ "get write parameters", no_argument, NULL, 'g' },
{ "blank cdrw disc", 1, NULL, 'b' },
{ "format cdrw disc", 1,NULL, 'm' },
- { "run mkudf on track", 1,NULL, 'u' },
+ { "run mkudffs on track", 1, NULL, 'u' },
+ { "set mkudffs version", 1, NULL, 'v' },
{ "set cd writing speed", 1, NULL, 't' },
{ "write fixed packets", 1, NULL, 'p' },
{ "perform quick setup", no_argument, NULL, 'q' },
@@ -67,7 +68,7 @@ void parse_args(int argc, char *argv[],
{
int retval;
- while ((retval = getopt_long(argc, argv, "r:t:im:u:d:sgqcb:p:z:l:w:f:o:h", long_options, NULL)) != EOF)
+ while ((retval = getopt_long(argc, argv, "r:t:im:u:v:d:sgqcb:p:z:l:w:f:o:h", long_options, NULL)) != EOF)
{
switch (retval)
{
@@ -90,6 +91,34 @@ void parse_args(int argc, char *argv[],
disc->mkudf = 1;
disc->offset = strtol(optarg, NULL, 10);
printf("mkudfing %lu blocks\n", disc->offset);
+ break;
+ }
+ case 'v':
+ {
+ struct logicalVolIntegrityDescImpUse *lvidiu;
+
+ disc->udf_disc.udf_rev = strtol(optarg, NULL, 16);
+ if (disc->udf_disc.udf_rev != 0x0102 &&
+ disc->udf_disc.udf_rev != 0x0150 &&
+ disc->udf_disc.udf_rev != 0x0200 &&
+ disc->udf_disc.udf_rev != 0x0201)
+ {
+ exit(1);
+ }
+ printf("udf version set to 0x%04x\n", disc->udf_disc.udf_rev);
+ if (disc->udf_disc.udf_rev < 0x0200)
+ {
+ disc->udf_disc.flags &= ~FLAG_EFE;
+ strcpy(disc->udf_disc.udf_pd[0]->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02);
+ }
+ ((uint16_t *)disc->udf_disc.udf_fsd->domainIdent.identSuffix)[0] = cpu_to_le16(disc->udf_disc.udf_rev);
+ ((uint16_t *)disc->udf_disc.udf_lvd[0]->domainIdent.identSuffix)[0] = cpu_to_le16(disc->udf_disc.udf_rev);
+ ((uint16_t *)disc->udf_disc.udf_iuvd[0]->impIdent.identSuffix)[0] = le16_to_cpu(disc->udf_disc.udf_rev);
+ lvidiu = (struct logicalVolIntegrityDescImpUse *)&(disc->udf_disc.udf_lvid->impUse[le32_to_cpu(disc->udf_disc.udf_lvd[0]->numPartitionMaps) * 2 * sizeof(uint32_t)]);
+ lvidiu->minUDFReadRev = le16_to_cpu(disc->udf_disc.udf_rev);
+ lvidiu->minUDFWriteRev = le16_to_cpu(disc->udf_disc.udf_rev);
+ lvidiu->maxUDFWriteRev = le16_to_cpu(disc->udf_disc.udf_rev);
+ ((uint16_t *)disc->udf_disc.udf_stable[0]->sparingIdent.identSuffix)[0] = le16_to_cpu(disc->udf_disc.udf_rev);
break;
}
case 'r':
| < Previous | Next > |