summaryrefslogtreecommitdiff
path: root/sys/isofs/cd9660/cd9660_rrip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/isofs/cd9660/cd9660_rrip.c')
-rw-r--r--sys/isofs/cd9660/cd9660_rrip.c299
1 files changed, 170 insertions, 129 deletions
diff --git a/sys/isofs/cd9660/cd9660_rrip.c b/sys/isofs/cd9660/cd9660_rrip.c
index c4bb7b24cc2..9bd8eb89094 100644
--- a/sys/isofs/cd9660/cd9660_rrip.c
+++ b/sys/isofs/cd9660/cd9660_rrip.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: cd9660_rrip.c,v 1.3 1996/10/04 03:05:30 deraadt Exp $ */
-/* $NetBSD: cd9660_rrip.c,v 1.12 1996/02/09 21:32:02 christos Exp $ */
+/* $OpenBSD: cd9660_rrip.c,v 1.4 1997/11/08 17:21:07 niklas Exp $ */
+/* $NetBSD: cd9660_rrip.c,v 1.17 1997/01/24 00:27:32 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -55,6 +55,7 @@
#include <sys/time.h>
#include <isofs/cd9660/iso.h>
+#include <isofs/cd9660/cd9660_extern.h>
#include <isofs/cd9660/cd9660_node.h>
#include <isofs/cd9660/cd9660_rrip.h>
#include <isofs/cd9660/iso_rrip.h>
@@ -81,7 +82,7 @@ static int cd9660_rrip_cont __P((void *, ISO_RRIP_ANALYZE *));
static int cd9660_rrip_stop __P((void *, ISO_RRIP_ANALYZE *));
static int cd9660_rrip_extref __P((void *, ISO_RRIP_ANALYZE *));
static int cd9660_rrip_loop __P((struct iso_directory_record *,
- ISO_RRIP_ANALYZE *, RRIP_TABLE *));
+ ISO_RRIP_ANALYZE *, RRIP_TABLE *));
/*
* POSIX file attribute
*/
@@ -91,12 +92,13 @@ cd9660_rrip_attr(v, ana)
ISO_RRIP_ANALYZE *ana;
{
ISO_RRIP_ATTR *p = v;
+
ana->inop->inode.iso_mode = isonum_733(p->mode);
ana->inop->inode.iso_uid = isonum_733(p->uid);
ana->inop->inode.iso_gid = isonum_733(p->gid);
ana->inop->inode.iso_links = isonum_733(p->links);
ana->fields &= ~ISO_SUSP_ATTR;
- return ISO_SUSP_ATTR;
+ return (ISO_SUSP_ATTR);
}
static void
@@ -105,9 +107,10 @@ cd9660_rrip_defattr(v, ana)
ISO_RRIP_ANALYZE *ana;
{
struct iso_directory_record *isodir = v;
+
/* But this is a required field! */
printf("RRIP without PX field?\n");
- cd9660_defattr(isodir,ana->inop,NULL);
+ cd9660_defattr(isodir, ana->inop, NULL);
}
/*
@@ -125,8 +128,8 @@ cd9660_rrip_slink(v, ana)
char *outbuf, *inbuf;
pcomp = (ISO_RRIP_SLINK_COMPONENT *)p->component;
- pcompe = (ISO_RRIP_SLINK_COMPONENT *)
- ((char *)p + isonum_711(p->h.length));
+ pcompe =
+ (ISO_RRIP_SLINK_COMPONENT *)((char *)p + isonum_711(p->h.length));
len = *ana->outlen;
outbuf = ana->outbuf;
cont = ana->cont;
@@ -134,10 +137,9 @@ cd9660_rrip_slink(v, ana)
/*
* Gathering a Symbolic name from each component with path
*/
- for (;
- pcomp < pcompe;
- pcomp = (ISO_RRIP_SLINK_COMPONENT *)((char *)pcomp + ISO_RRIP_SLSIZ
- + isonum_711(pcomp->clen))) {
+ for (; pcomp < pcompe;
+ pcomp = (ISO_RRIP_SLINK_COMPONENT *)
+ ((char *)pcomp + ISO_RRIP_SLSIZ + isonum_711(pcomp->clen))) {
if (!cont) {
if (len < ana->maxlen) {
@@ -204,13 +206,12 @@ cd9660_rrip_slink(v, ana)
ana->fields = 0;
ana->outbuf -= *ana->outlen;
*ana->outlen = 0;
- return 0;
+ return (0);
}
- bcopy(inbuf,outbuf,wlen);
+ bcopy(inbuf, outbuf, wlen);
outbuf += wlen;
len += wlen;
-
}
ana->outbuf = outbuf;
*ana->outlen = len;
@@ -218,9 +219,9 @@ cd9660_rrip_slink(v, ana)
if (!isonum_711(p->flags)) {
ana->fields &= ~ISO_SUSP_SLINK;
- return ISO_SUSP_SLINK;
+ return (ISO_SUSP_SLINK);
}
- return 0;
+ return (0);
}
/*
@@ -277,17 +278,17 @@ cd9660_rrip_altname(v, ana)
ana->fields &= ~ISO_SUSP_ALTNAME;
ana->outbuf -= *ana->outlen - wlen;
*ana->outlen = 0;
- return 0;
+ return (0);
}
- bcopy(inbuf,ana->outbuf,wlen);
+ bcopy(inbuf, ana->outbuf, wlen);
ana->outbuf += wlen;
if (!cont) {
ana->fields &= ~ISO_SUSP_ALTNAME;
- return ISO_SUSP_ALTNAME;
+ return (ISO_SUSP_ALTNAME);
}
- return 0;
+ return (0);
}
static void
@@ -296,12 +297,13 @@ cd9660_rrip_defname(v, ana)
ISO_RRIP_ANALYZE *ana;
{
struct iso_directory_record *isodir = v;
- strcpy(ana->outbuf,"..");
+
+ strcpy(ana->outbuf, "..");
switch (*isodir->name) {
default:
- isofntrans(isodir->name,isonum_711(isodir->name_len),
- ana->outbuf,ana->outlen,
- 1,isonum_711(isodir->flags)&4);
+ isofntrans(isodir->name, isonum_711(isodir->name_len),
+ ana->outbuf, ana->outlen, 1,
+ isonum_711(isodir->flags) & 4);
break;
case 0:
*ana->outlen = 1;
@@ -321,9 +323,10 @@ cd9660_rrip_pclink(v, ana)
ISO_RRIP_ANALYZE *ana;
{
ISO_RRIP_CLINK *p = v;
+
*ana->inump = isonum_733(p->dir_loc) << ana->imp->im_bshift;
- ana->fields &= ~(ISO_SUSP_CLINK|ISO_SUSP_PLINK);
- return *p->h.type == 'C' ? ISO_SUSP_CLINK : ISO_SUSP_PLINK;
+ ana->fields &= ~(ISO_SUSP_CLINK | ISO_SUSP_PLINK);
+ return (*p->h.type == 'C' ? ISO_SUSP_CLINK : ISO_SUSP_PLINK);
}
/*
@@ -338,7 +341,8 @@ cd9660_rrip_reldir(v, ana)
/* special hack to make caller aware of RE field */
*ana->outlen = 0;
ana->fields = 0;
- return ISO_SUSP_RELDIR|ISO_SUSP_ALTNAME|ISO_SUSP_CLINK|ISO_SUSP_PLINK;
+ return (ISO_SUSP_RELDIR | ISO_SUSP_ALTNAME | ISO_SUSP_CLINK |
+ ISO_SUSP_PLINK);
}
static int
@@ -352,51 +356,63 @@ cd9660_rrip_tstamp(v, ana)
ptime = p->time;
/* Check a format of time stamp (7bytes/17bytes) */
- if (!(*p->flags&ISO_SUSP_TSTAMP_FORM17)) {
- if (*p->flags&ISO_SUSP_TSTAMP_CREAT)
+ if (!(*p->flags & ISO_SUSP_TSTAMP_FORM17)) {
+ if (*p->flags & ISO_SUSP_TSTAMP_CREAT)
ptime += 7;
- if (*p->flags&ISO_SUSP_TSTAMP_MODIFY) {
- cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_mtime);
+ if (*p->flags & ISO_SUSP_TSTAMP_MODIFY) {
+ cd9660_tstamp_conv7(ptime,
+ &ana->inop->inode.iso_mtime);
ptime += 7;
} else
- bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec));
+ bzero(&ana->inop->inode.iso_mtime,
+ sizeof(struct timespec));
- if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) {
- cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_atime);
+ if (*p->flags & ISO_SUSP_TSTAMP_ACCESS) {
+ cd9660_tstamp_conv7(ptime,
+ &ana->inop->inode.iso_atime);
ptime += 7;
} else
- ana->inop->inode.iso_atime = ana->inop->inode.iso_mtime;
+ ana->inop->inode.iso_atime =
+ ana->inop->inode.iso_mtime;
- if (*p->flags&ISO_SUSP_TSTAMP_ATTR)
- cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_ctime);
+ if (*p->flags & ISO_SUSP_TSTAMP_ATTR)
+ cd9660_tstamp_conv7(ptime,
+ &ana->inop->inode.iso_ctime);
else
- ana->inop->inode.iso_ctime = ana->inop->inode.iso_mtime;
+ ana->inop->inode.iso_ctime =
+ ana->inop->inode.iso_mtime;
} else {
- if (*p->flags&ISO_SUSP_TSTAMP_CREAT)
+ if (*p->flags & ISO_SUSP_TSTAMP_CREAT)
ptime += 17;
- if (*p->flags&ISO_SUSP_TSTAMP_MODIFY) {
- cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_mtime);
+ if (*p->flags & ISO_SUSP_TSTAMP_MODIFY) {
+ cd9660_tstamp_conv17(ptime,
+ &ana->inop->inode.iso_mtime);
ptime += 17;
} else
- bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec));
+ bzero(&ana->inop->inode.iso_mtime,
+ sizeof(struct timespec));
- if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) {
- cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_atime);
+ if (*p->flags & ISO_SUSP_TSTAMP_ACCESS) {
+ cd9660_tstamp_conv17(ptime,
+ &ana->inop->inode.iso_atime);
ptime += 17;
} else
- ana->inop->inode.iso_atime = ana->inop->inode.iso_mtime;
+ ana->inop->inode.iso_atime =
+ ana->inop->inode.iso_mtime;
- if (*p->flags&ISO_SUSP_TSTAMP_ATTR)
- cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_ctime);
+ if (*p->flags & ISO_SUSP_TSTAMP_ATTR)
+ cd9660_tstamp_conv17(ptime,
+ &ana->inop->inode.iso_ctime);
else
- ana->inop->inode.iso_ctime = ana->inop->inode.iso_mtime;
+ ana->inop->inode.iso_ctime =
+ ana->inop->inode.iso_mtime;
}
ana->fields &= ~ISO_SUSP_TSTAMP;
- return ISO_SUSP_TSTAMP;
+ return (ISO_SUSP_TSTAMP);
}
static void
@@ -405,7 +421,8 @@ cd9660_rrip_deftstamp(v, ana)
ISO_RRIP_ANALYZE *ana;
{
struct iso_directory_record *isodir = v;
- cd9660_deftstamp(isodir,ana->inop,NULL);
+
+ cd9660_deftstamp(isodir, ana->inop, NULL);
}
/*
@@ -427,7 +444,7 @@ cd9660_rrip_device(v, ana)
else
ana->inop->inode.iso_rdev = makedev(high, minor(low));
ana->fields &= ~ISO_SUSP_DEVICE;
- return ISO_SUSP_DEVICE;
+ return (ISO_SUSP_DEVICE);
}
/*
@@ -439,12 +456,14 @@ cd9660_rrip_idflag(v, ana)
ISO_RRIP_ANALYZE *ana;
{
ISO_RRIP_IDFLAG *p = v;
- ana->fields &= isonum_711(p->flags)|~0xff; /* don't touch high bits */
+
+ /* don't touch high bits */
+ ana->fields &= isonum_711(p->flags) | ~0xff;
/* special handling of RE field */
- if (ana->fields&ISO_SUSP_RELDIR)
- return cd9660_rrip_reldir(p,ana);
+ if (ana->fields & ISO_SUSP_RELDIR)
+ return (cd9660_rrip_reldir(p, ana));
- return ISO_SUSP_IDFLAG;
+ return (ISO_SUSP_IDFLAG);
}
/*
@@ -456,10 +475,11 @@ cd9660_rrip_cont(v, ana)
ISO_RRIP_ANALYZE *ana;
{
ISO_RRIP_CONT *p = v;
+
ana->iso_ce_blk = isonum_733(p->location);
ana->iso_ce_off = isonum_733(p->offset);
ana->iso_ce_len = isonum_733(p->length);
- return ISO_SUSP_CONT;
+ return (ISO_SUSP_CONT);
}
/*
@@ -470,7 +490,7 @@ cd9660_rrip_stop(v, ana)
void *v;
ISO_RRIP_ANALYZE *ana;
{
- return ISO_SUSP_STOP;
+ return (ISO_SUSP_STOP);
}
/*
@@ -484,24 +504,24 @@ cd9660_rrip_extref(v, ana)
ISO_RRIP_EXTREF *p = v;
if (isonum_711(p->version) != 1)
- return 0;
- if (isonum_711(p->len_id) != 9
- && isonum_711(p->len_id) != 10)
- return 0;
- if (isonum_711(p->len_id) == 9
- && bcmp((char *)p + 8, "IEEE_1282", 9))
- return 0;
- if (isonum_711(p->len_id) == 10
- && bcmp((char *)p + 8, "IEEE_P1282", 10)
- && bcmp((char *)p + 8, "RRIP_1991A", 10))
- return 0;
+ return (0);
+ if (isonum_711(p->len_id) != 9 &&
+ isonum_711(p->len_id) != 10)
+ return (0);
+ if (isonum_711(p->len_id) == 9 &&
+ bcmp((char *)p + 8, "IEEE_1282", 9))
+ return (0);
+ if (isonum_711(p->len_id) == 10 &&
+ bcmp((char *)p + 8, "IEEE_P1282", 10) &&
+ bcmp((char *)p + 8, "RRIP_1991A", 10))
+ return (0);
ana->fields &= ~ISO_SUSP_EXTREF;
- return ISO_SUSP_EXTREF;
+ return (ISO_SUSP_EXTREF);
}
static int
-cd9660_rrip_loop(isodir,ana,table)
+cd9660_rrip_loop(isodir, ana, table)
struct iso_directory_record *isodir;
ISO_RRIP_ANALYZE *ana;
RRIP_TABLE *table;
@@ -515,21 +535,22 @@ cd9660_rrip_loop(isodir,ana,table)
/*
* Note: If name length is odd,
- * it will be padding 1 byte after the name
+ * it will be padded by 1 byte after the name
*/
pwhead = isodir->name + isonum_711(isodir->name_len);
- if (!(isonum_711(isodir->name_len)&1))
+ if (!(isonum_711(isodir->name_len) & 1))
pwhead++;
/* If it's not the '.' entry of the root dir obey SP field */
- if (*isodir->name != 0
- || isonum_733(isodir->extent) != ana->imp->root_extent)
+ if (*isodir->name != 0 ||
+ isonum_733(isodir->extent) != ana->imp->root_extent)
pwhead += ana->imp->rr_skip;
else
pwhead += ana->imp->rr_skip0;
phead = (ISO_SUSP_HEADER *)pwhead;
- pend = (ISO_SUSP_HEADER *)((char *)isodir + isonum_711(isodir->length));
+ pend =
+ (ISO_SUSP_HEADER *)((char *)isodir + isonum_711(isodir->length));
result = 0;
while (1) {
@@ -540,16 +561,18 @@ cd9660_rrip_loop(isodir,ana,table)
while (pend >= phead + 1) {
if (isonum_711(phead->version) == 1) {
for (ptable = table; ptable->func; ptable++) {
- if (*phead->type == *ptable->type
- && phead->type[1] == ptable->type[1]) {
- result |= ptable->func(phead,ana);
+ if (*phead->type == *ptable->type &&
+ phead->type[1] == ptable->type[1])
+ {
+ result |=
+ ptable->func(phead, ana);
break;
}
}
if (!ana->fields)
break;
}
- if (result&ISO_SUSP_STOP) {
+ if (result & ISO_SUSP_STOP) {
result &= ~ISO_SUSP_STOP;
break;
}
@@ -560,20 +583,23 @@ cd9660_rrip_loop(isodir,ana,table)
* move to next SUSP
* Hopefully this works with newer versions, too
*/
- phead = (ISO_SUSP_HEADER *)((char *)phead + isonum_711(phead->length));
+ phead = (ISO_SUSP_HEADER *)
+ ((char *)phead + isonum_711(phead->length));
}
if (ana->fields && ana->iso_ce_len) {
- if (ana->iso_ce_blk >= ana->imp->volume_space_size
- || ana->iso_ce_off + ana->iso_ce_len > ana->imp->logical_block_size
- || bread(ana->imp->im_devvp,
- ana->iso_ce_blk <<
- (ana->imp->im_bshift - DEV_BSHIFT),
- ana->imp->logical_block_size, NOCRED, &bp))
+ if (ana->iso_ce_blk >= ana->imp->volume_space_size ||
+ ana->iso_ce_off + ana->iso_ce_len >
+ ana->imp->logical_block_size ||
+ bread(ana->imp->im_devvp, ana->iso_ce_blk <<
+ (ana->imp->im_bshift - DEV_BSHIFT),
+ ana->imp->logical_block_size, NOCRED, &bp))
/* what to do now? */
break;
- phead = (ISO_SUSP_HEADER *)(bp->b_data + ana->iso_ce_off);
- pend = (ISO_SUSP_HEADER *) ((char *)phead + ana->iso_ce_len);
+ phead =
+ (ISO_SUSP_HEADER *)(bp->b_data + ana->iso_ce_off);
+ pend = (ISO_SUSP_HEADER *)
+ ((char *)phead + ana->iso_ce_len);
} else
break;
}
@@ -584,23 +610,30 @@ cd9660_rrip_loop(isodir,ana,table)
* (attribute/time stamp)
*/
for (ptable = table; ptable->func2; ptable++)
- if (!(ptable->result&result))
- ptable->func2(isodir,ana);
+ if (!(ptable->result & result))
+ ptable->func2(isodir, ana);
- return result;
+ return (result);
}
/*
* Get Attributes.
*/
static RRIP_TABLE rrip_table_analyze[] = {
- { "PX", cd9660_rrip_attr, cd9660_rrip_defattr, ISO_SUSP_ATTR },
- { "TF", cd9660_rrip_tstamp, cd9660_rrip_deftstamp, ISO_SUSP_TSTAMP },
- { "PN", cd9660_rrip_device, 0, ISO_SUSP_DEVICE },
- { "RR", cd9660_rrip_idflag, 0, ISO_SUSP_IDFLAG },
- { "CE", cd9660_rrip_cont, 0, ISO_SUSP_CONT },
- { "ST", cd9660_rrip_stop, 0, ISO_SUSP_STOP },
- { "", 0, 0, 0 }
+ { "PX", cd9660_rrip_attr, cd9660_rrip_defattr,
+ ISO_SUSP_ATTR },
+ { "TF", cd9660_rrip_tstamp, cd9660_rrip_deftstamp,
+ ISO_SUSP_TSTAMP },
+ { "PN", cd9660_rrip_device, 0,
+ ISO_SUSP_DEVICE },
+ { "RR", cd9660_rrip_idflag, 0,
+ ISO_SUSP_IDFLAG },
+ { "CE", cd9660_rrip_cont, 0,
+ ISO_SUSP_CONT },
+ { "ST", cd9660_rrip_stop, 0,
+ ISO_SUSP_STOP },
+ { "", 0, 0,
+ 0 }
};
int
@@ -613,27 +646,35 @@ cd9660_rrip_analyze(isodir, inop, imp)
analyze.inop = inop;
analyze.imp = imp;
- analyze.fields = ISO_SUSP_ATTR|ISO_SUSP_TSTAMP|ISO_SUSP_DEVICE;
+ analyze.fields = ISO_SUSP_ATTR | ISO_SUSP_TSTAMP | ISO_SUSP_DEVICE;
- return cd9660_rrip_loop(isodir,&analyze,rrip_table_analyze);
+ return (cd9660_rrip_loop(isodir, &analyze, rrip_table_analyze));
}
/*
* Get Alternate Name.
*/
static RRIP_TABLE rrip_table_getname[] = {
- { "NM", cd9660_rrip_altname, cd9660_rrip_defname, ISO_SUSP_ALTNAME },
- { "CL", cd9660_rrip_pclink, 0, ISO_SUSP_CLINK|ISO_SUSP_PLINK },
- { "PL", cd9660_rrip_pclink, 0, ISO_SUSP_CLINK|ISO_SUSP_PLINK },
- { "RE", cd9660_rrip_reldir, 0, ISO_SUSP_RELDIR },
- { "RR", cd9660_rrip_idflag, 0, ISO_SUSP_IDFLAG },
- { "CE", cd9660_rrip_cont, 0, ISO_SUSP_CONT },
- { "ST", cd9660_rrip_stop, 0, ISO_SUSP_STOP },
- { "", 0, 0, 0 }
+ { "NM", cd9660_rrip_altname, cd9660_rrip_defname,
+ ISO_SUSP_ALTNAME },
+ { "CL", cd9660_rrip_pclink, 0,
+ ISO_SUSP_CLINK|ISO_SUSP_PLINK },
+ { "PL", cd9660_rrip_pclink, 0,
+ ISO_SUSP_CLINK|ISO_SUSP_PLINK },
+ { "RE", cd9660_rrip_reldir, 0,
+ ISO_SUSP_RELDIR },
+ { "RR", cd9660_rrip_idflag, 0,
+ ISO_SUSP_IDFLAG },
+ { "CE", cd9660_rrip_cont, 0,
+ ISO_SUSP_CONT },
+ { "ST", cd9660_rrip_stop, 0,
+ ISO_SUSP_STOP },
+ { "", 0, 0,
+ 0 }
};
int
-cd9660_rrip_getname(isodir,outbuf,outlen,inump,imp)
+cd9660_rrip_getname(isodir, outbuf, outlen, inump, imp)
struct iso_directory_record *isodir;
char *outbuf;
u_short *outlen;
@@ -648,34 +689,34 @@ cd9660_rrip_getname(isodir,outbuf,outlen,inump,imp)
analyze.maxlen = NAME_MAX;
analyze.inump = inump;
analyze.imp = imp;
- analyze.fields = ISO_SUSP_ALTNAME|ISO_SUSP_RELDIR|ISO_SUSP_CLINK|ISO_SUSP_PLINK;
+ analyze.fields = ISO_SUSP_ALTNAME | ISO_SUSP_RELDIR | ISO_SUSP_CLINK |
+ ISO_SUSP_PLINK;
*outlen = 0;
tab = rrip_table_getname;
- if (*isodir->name == 0
- || *isodir->name == 1) {
- cd9660_rrip_defname(isodir,&analyze);
+ if (*isodir->name == 0 || *isodir->name == 1) {
+ cd9660_rrip_defname(isodir, &analyze);
analyze.fields &= ~ISO_SUSP_ALTNAME;
tab++;
}
- return cd9660_rrip_loop(isodir,&analyze,tab);
+ return (cd9660_rrip_loop(isodir, &analyze, tab));
}
/*
* Get Symbolic Link.
*/
static RRIP_TABLE rrip_table_getsymname[] = {
- { "SL", cd9660_rrip_slink, 0, ISO_SUSP_SLINK },
- { "RR", cd9660_rrip_idflag, 0, ISO_SUSP_IDFLAG },
- { "CE", cd9660_rrip_cont, 0, ISO_SUSP_CONT },
- { "ST", cd9660_rrip_stop, 0, ISO_SUSP_STOP },
- { "", 0, 0, 0 }
+ { "SL", cd9660_rrip_slink, 0, ISO_SUSP_SLINK },
+ { "RR", cd9660_rrip_idflag, 0, ISO_SUSP_IDFLAG },
+ { "CE", cd9660_rrip_cont, 0, ISO_SUSP_CONT },
+ { "ST", cd9660_rrip_stop, 0, ISO_SUSP_STOP },
+ { "", 0, 0, 0 }
};
int
-cd9660_rrip_getsymname(isodir,outbuf,outlen,imp)
+cd9660_rrip_getsymname(isodir, outbuf, outlen, imp)
struct iso_directory_record *isodir;
char *outbuf;
u_short *outlen;
@@ -692,7 +733,7 @@ cd9660_rrip_getsymname(isodir,outbuf,outlen,imp)
analyze.fields = ISO_SUSP_SLINK;
return (cd9660_rrip_loop(isodir, &analyze, rrip_table_getsymname) &
- ISO_SUSP_SLINK);
+ ISO_SUSP_SLINK);
}
static RRIP_TABLE rrip_table_extref[] = {
@@ -707,7 +748,7 @@ static RRIP_TABLE rrip_table_extref[] = {
* Note: We insist on the ER field.
*/
int
-cd9660_rrip_offset(isodir,imp)
+cd9660_rrip_offset(isodir, imp)
struct iso_directory_record *isodir;
struct iso_mnt *imp;
{
@@ -716,19 +757,19 @@ cd9660_rrip_offset(isodir,imp)
imp->rr_skip0 = 0;
p = (ISO_RRIP_OFFSET *)(isodir->name + 1);
- if (bcmp(p,"SP\7\1\276\357",6)) {
+ if (bcmp(p, "SP\7\1\276\357", 6)) {
/* Maybe, it's a CDROM XA disc? */
imp->rr_skip0 = 15;
p = (ISO_RRIP_OFFSET *)((char *)p + 15);
- if (bcmp(p,"SP\7\1\276\357",6))
- return -1;
+ if (bcmp(p, "SP\7\1\276\357", 6))
+ return (-1);
}
analyze.imp = imp;
analyze.fields = ISO_SUSP_EXTREF;
- if (!(cd9660_rrip_loop(isodir, &analyze, rrip_table_extref)
- & ISO_SUSP_EXTREF))
- return -1;
+ if (!(cd9660_rrip_loop(isodir, &analyze, rrip_table_extref) &
+ ISO_SUSP_EXTREF))
+ return (-1);
- return isonum_711(p->skip);
+ return (isonum_711(p->skip));
}