-/* $OpenBSD: cd9660_bmap.c,v 1.9 2017/12/30 20:47:00 guenther Exp $ */
+/* $OpenBSD: cd9660_bmap.c,v 1.10 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: cd9660_bmap.c,v 1.7 1997/01/24 00:27:29 cgd Exp $ */
/*-
* number to index into the data block (extent) for the file.
*/
int
-cd9660_bmap(v)
- void *v;
+cd9660_bmap(void *v)
{
struct vop_bmap_args *ap = v;
struct iso_node *ip = VTOI(ap->a_vp);
-/* $OpenBSD: cd9660_lookup.c,v 1.27 2018/05/02 02:24:55 visa Exp $ */
+/* $OpenBSD: cd9660_lookup.c,v 1.28 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: cd9660_lookup.c,v 1.18 1997/05/08 16:19:59 mycroft Exp $ */
/*-
* NOTE: (LOOKUP | LOCKPARENT) currently returns the parent inode unlocked.
*/
int
-cd9660_lookup(v)
- void *v;
+cd9660_lookup(void *v)
{
struct vop_lookup_args *ap = v;
register struct vnode *vdp; /* vnode for directory being searched */
-/* $OpenBSD: cd9660_node.c,v 1.35 2020/02/27 09:10:31 mpi Exp $ */
+/* $OpenBSD: cd9660_node.c,v 1.36 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */
/*-
* Initialize hash links for inodes and dnodes.
*/
int
-cd9660_init(vfsp)
- struct vfsconf *vfsp;
+cd9660_init(struct vfsconf *vfsp)
{
isohashtbl = hashinit(initialvnodes, M_ISOFSMNT, M_WAITOK, &isohash);
* to it. If it is in core, but locked, wait for it.
*/
struct vnode *
-cd9660_ihashget(dev, inum)
- dev_t dev;
- cdino_t inum;
+cd9660_ihashget(dev_t dev, cdino_t inum)
{
struct iso_node *ip;
struct vnode *vp;
* Insert the inode into the hash table, and return it locked.
*/
int
-cd9660_ihashins(ip)
- struct iso_node *ip;
+cd9660_ihashins(struct iso_node *ip)
{
struct iso_node **ipp, *iq;
* Remove the inode from the hash table.
*/
void
-cd9660_ihashrem(ip)
- register struct iso_node *ip;
+cd9660_ihashrem(struct iso_node *ip)
{
register struct iso_node *iq;
* truncate and deallocate the file.
*/
int
-cd9660_inactive(v)
- void *v;
+cd9660_inactive(void *v)
{
struct vop_inactive_args *ap = v;
struct vnode *vp = ap->a_vp;
* Reclaim an inode so that it can be used for other purposes.
*/
int
-cd9660_reclaim(v)
- void *v;
+cd9660_reclaim(void *v)
{
struct vop_reclaim_args *ap = v;
register struct vnode *vp = ap->a_vp;
* File attributes
*/
void
-cd9660_defattr(isodir, inop, bp)
- struct iso_directory_record *isodir;
- struct iso_node *inop;
- struct buf *bp;
+cd9660_defattr(struct iso_directory_record *isodir, struct iso_node *inop,
+ struct buf *bp)
{
struct buf *bp2 = NULL;
struct iso_mnt *imp;
* Time stamps
*/
void
-cd9660_deftstamp(isodir,inop,bp)
- struct iso_directory_record *isodir;
- struct iso_node *inop;
- struct buf *bp;
+cd9660_deftstamp(struct iso_directory_record *isodir, struct iso_node *inop,
+ struct buf *bp)
{
struct buf *bp2 = NULL;
struct iso_mnt *imp;
}
int
-cd9660_tstamp_conv7(pi,pu)
- u_char *pi;
- struct timespec *pu;
+cd9660_tstamp_conv7(u_char *pi, struct timespec *pu)
{
int crtime, days;
int y, m, d, hour, minute, second;
}
static u_int
-cd9660_chars2ui(begin,len)
- u_char *begin;
- int len;
+cd9660_chars2ui(u_char *begin, int len)
{
u_int rc;
}
int
-cd9660_tstamp_conv17(pi,pu)
- u_char *pi;
- struct timespec *pu;
+cd9660_tstamp_conv17(u_char *pi, struct timespec *pu)
{
u_char buf[7];
}
cdino_t
-isodirino(isodir, imp)
- struct iso_directory_record *isodir;
- struct iso_mnt *imp;
+isodirino(struct iso_directory_record *isodir, struct iso_mnt *imp)
{
cdino_t ino;
-/* $OpenBSD: cd9660_rrip.c,v 1.14 2017/09/08 05:36:53 deraadt Exp $ */
+/* $OpenBSD: cd9660_rrip.c,v 1.15 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: cd9660_rrip.c,v 1.17 1997/01/24 00:27:32 cgd Exp $ */
/*-
* POSIX file attribute
*/
static int
-cd9660_rrip_attr(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_attr(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_ATTR *p = v;
}
static void
-cd9660_rrip_defattr(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_defattr(void *v, ISO_RRIP_ANALYZE *ana)
{
struct iso_directory_record *isodir = v;
* Symbolic Links
*/
static int
-cd9660_rrip_slink(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_slink(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_SLINK *p = v;
register ISO_RRIP_SLINK_COMPONENT *pcomp;
* Alternate name
*/
static int
-cd9660_rrip_altname(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_altname(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_ALTNAME *p = v;
char *inbuf;
}
static void
-cd9660_rrip_defname(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_defname(void *v, ISO_RRIP_ANALYZE *ana)
{
struct iso_directory_record *isodir = v;
* Parent or Child Link
*/
static int
-cd9660_rrip_pclink(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_pclink(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_CLINK *p = v;
*/
/*ARGSUSED*/
static int
-cd9660_rrip_reldir(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_reldir(void *v, ISO_RRIP_ANALYZE *ana)
{
/* special hack to make caller aware of RE field */
*ana->outlen = 0;
}
static int
-cd9660_rrip_tstamp(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_tstamp(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_TSTAMP *p = v;
u_char *ptime;
}
static void
-cd9660_rrip_deftstamp(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_deftstamp(void *v, ISO_RRIP_ANALYZE *ana)
{
struct iso_directory_record *isodir = v;
* POSIX device modes
*/
static int
-cd9660_rrip_device(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_device(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_DEVICE *p = v;
u_int high, low;
* Flag indicating
*/
static int
-cd9660_rrip_idflag(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_idflag(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_IDFLAG *p = v;
* Continuation pointer
*/
static int
-cd9660_rrip_cont(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_cont(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_CONT *p = v;
* System Use end
*/
static int
-cd9660_rrip_stop(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_stop(void *v, ISO_RRIP_ANALYZE *ana)
{
return (ISO_SUSP_STOP);
}
* Extension reference
*/
static int
-cd9660_rrip_extref(v, ana)
- void *v;
- ISO_RRIP_ANALYZE *ana;
+cd9660_rrip_extref(void *v, ISO_RRIP_ANALYZE *ana)
{
ISO_RRIP_EXTREF *p = v;
static int
-cd9660_rrip_loop(isodir, ana, table)
- struct iso_directory_record *isodir;
- ISO_RRIP_ANALYZE *ana;
- RRIP_TABLE *table;
+cd9660_rrip_loop(struct iso_directory_record *isodir, ISO_RRIP_ANALYZE *ana,
+ RRIP_TABLE *table)
{
register RRIP_TABLE *ptable;
register ISO_SUSP_HEADER *phead;
};
int
-cd9660_rrip_analyze(isodir, inop, imp)
- struct iso_directory_record *isodir;
- struct iso_node *inop;
- struct iso_mnt *imp;
+cd9660_rrip_analyze(struct iso_directory_record *isodir, struct iso_node *inop,
+ struct iso_mnt *imp)
{
ISO_RRIP_ANALYZE analyze;
};
int
-cd9660_rrip_getname(isodir, outbuf, outlen, inump, imp)
- struct iso_directory_record *isodir;
- char *outbuf;
- u_short *outlen;
- cdino_t *inump;
- struct iso_mnt *imp;
+cd9660_rrip_getname(struct iso_directory_record *isodir, char *outbuf,
+ u_short *outlen, cdino_t *inump, struct iso_mnt *imp)
{
ISO_RRIP_ANALYZE analyze;
RRIP_TABLE *tab;
};
int
-cd9660_rrip_getsymname(isodir, outbuf, outlen, imp)
- struct iso_directory_record *isodir;
- char *outbuf;
- u_short *outlen;
- struct iso_mnt *imp;
+cd9660_rrip_getsymname(struct iso_directory_record *isodir, char *outbuf,
+ u_short *outlen, struct iso_mnt *imp)
{
ISO_RRIP_ANALYZE analyze;
* Note: We insist on the ER field.
*/
int
-cd9660_rrip_offset(isodir, imp)
- struct iso_directory_record *isodir;
- struct iso_mnt *imp;
+cd9660_rrip_offset(struct iso_directory_record *isodir, struct iso_mnt *imp)
{
ISO_RRIP_OFFSET *p;
ISO_RRIP_ANALYZE analyze;
-/* $OpenBSD: cd9660_util.c,v 1.10 2017/12/30 20:47:00 guenther Exp $ */
+/* $OpenBSD: cd9660_util.c,v 1.11 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: cd9660_util.c,v 1.12 1997/01/24 00:27:33 cgd Exp $ */
/*-
* Return number of bytes consumed
*/
int
-isochar(isofn, isoend, joliet_level, c)
- const u_char *isofn;
- const u_char *isoend;
- int joliet_level;
- u_char *c;
+isochar(const u_char *isofn, const u_char *isoend, int joliet_level, u_char *c)
{
*c = *isofn++;
if (joliet_level == 0 || isofn == isoend)
* Note: Version number plus ';' may be omitted.
*/
int
-isofncmp(fn, fnlen, isofn, isolen, joliet_level)
- const u_char *fn, *isofn;
- int fnlen, isolen, joliet_level;
+isofncmp(const u_char *fn, int fnlen, const u_char *isofn, int isolen,
+ int joliet_level)
{
int i, j;
u_char c;
* translate a filename of length > 0
*/
void
-isofntrans(infn, infnlen, outfn, outfnlen, original, assoc, joliet_level)
- u_char *infn, *outfn;
- int infnlen;
- u_short *outfnlen;
- int original;
- int assoc;
- int joliet_level;
+isofntrans(u_char *infn, int infnlen, u_char *outfn, u_short *outfnlen,
+ int original, int assoc, int joliet_level)
{
int fnidx = 0;
u_char c, d = '\0', *infnend = infn + infnlen;
-/* $OpenBSD: cd9660_vfsops.c,v 1.93 2019/12/26 13:28:49 bluhm Exp $ */
+/* $OpenBSD: cd9660_vfsops.c,v 1.94 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */
/*-
* mount system call
*/
int
-cd9660_mount(mp, path, data, ndp, p)
- register struct mount *mp;
- const char *path;
- void *data;
- struct nameidata *ndp;
- struct proc *p;
+cd9660_mount(struct mount *mp, const char *path, void *data,
+ struct nameidata *ndp, struct proc *p)
{
struct iso_mnt *imp = NULL;
struct iso_args *args = data;
* Common code for mount and mountroot
*/
static int
-iso_mountfs(devvp, mp, p, argp)
- register struct vnode *devvp;
- struct mount *mp;
- struct proc *p;
- struct iso_args *argp;
+iso_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p,
+ struct iso_args *argp)
{
register struct iso_mnt *isomp = NULL;
struct buf *bp = NULL;
* Test to see if the device is an ISOFS filesystem.
*/
int
-iso_disklabelspoof(dev, strat, lp)
- dev_t dev;
- void (*strat)(struct buf *);
- register struct disklabel *lp;
+iso_disklabelspoof(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
{
struct buf *bp = NULL;
struct iso_volume_descriptor *vdp;
*/
/* ARGSUSED */
int
-cd9660_start(mp, flags, p)
- struct mount *mp;
- int flags;
- struct proc *p;
+cd9660_start(struct mount *mp, int flags, struct proc *p)
{
return (0);
}
* unmount system call
*/
int
-cd9660_unmount(mp, mntflags, p)
- struct mount *mp;
- int mntflags;
- struct proc *p;
+cd9660_unmount(struct mount *mp, int mntflags, struct proc *p)
{
register struct iso_mnt *isomp;
int error, flags = 0;
* Return root of a filesystem
*/
int
-cd9660_root(mp, vpp)
- struct mount *mp;
- struct vnode **vpp;
+cd9660_root(struct mount *mp, struct vnode **vpp)
{
struct iso_mnt *imp = VFSTOISOFS(mp);
struct iso_directory_record *dp =
*/
/* ARGSUSED */
int
-cd9660_quotactl(mp, cmd, uid, arg, p)
- struct mount *mp;
- int cmd;
- uid_t uid;
- caddr_t arg;
- struct proc *p;
+cd9660_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg,
+ struct proc *p)
{
return (EOPNOTSUPP);
* Get file system statistics.
*/
int
-cd9660_statfs(mp, sbp, p)
- struct mount *mp;
- register struct statfs *sbp;
- struct proc *p;
+cd9660_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
{
register struct iso_mnt *isomp;
/* ARGSUSED */
int
-cd9660_sync(mp, waitfor, stall, cred, p)
- struct mount *mp;
- int waitfor;
- int stall;
- struct ucred *cred;
- struct proc *p;
+cd9660_sync(struct mount *mp, int waitfor, int stall, struct ucred *cred,
+ struct proc *p)
{
return (0);
}
/* ARGSUSED */
int
-cd9660_fhtovp(mp, fhp, vpp)
- register struct mount *mp;
- struct fid *fhp;
- struct vnode **vpp;
+cd9660_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp)
{
struct ifid *ifhp = (struct ifid *)fhp;
register struct iso_node *ip;
}
int
-cd9660_vget(mp, ino, vpp)
- struct mount *mp;
- ino_t ino;
- struct vnode **vpp;
+cd9660_vget(struct mount *mp, ino_t ino, struct vnode **vpp)
{
if (ino > (cdino_t)-1)
}
int
-cd9660_vget_internal(mp, ino, vpp, relocated, isodir)
- struct mount *mp;
- cdino_t ino;
- struct vnode **vpp;
- int relocated;
- struct iso_directory_record *isodir;
+cd9660_vget_internal(struct mount *mp, cdino_t ino, struct vnode **vpp,
+ int relocated, struct iso_directory_record *isodir)
{
register struct iso_mnt *imp;
struct iso_node *ip;
*/
/* ARGSUSED */
int
-cd9660_vptofh(vp, fhp)
- struct vnode *vp;
- struct fid *fhp;
+cd9660_vptofh(struct vnode *vp, struct fid *fhp)
{
register struct iso_node *ip = VTOI(vp);
register struct ifid *ifhp;
* exflagsp and credanonp.
*/
int
-cd9660_check_export(mp, nam, exflagsp, credanonp)
- register struct mount *mp;
- struct mbuf *nam;
- int *exflagsp;
- struct ucred **credanonp;
+cd9660_check_export(struct mount *mp, struct mbuf *nam, int *exflagsp,
+ struct ucred **credanonp)
{
register struct netcred *np;
register struct iso_mnt *imp = VFSTOISOFS(mp);
-/* $OpenBSD: cd9660_vnops.c,v 1.86 2020/12/25 12:59:52 visa Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.87 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
}
int
-iso_uiodir(idp,dp,off)
- struct isoreaddir *idp;
- struct dirent *dp;
- off_t off;
+iso_uiodir(struct isoreaddir *idp, struct dirent *dp, off_t off)
{
int error;
}
int
-iso_shipdir(idp)
- struct isoreaddir *idp;
+iso_shipdir(struct isoreaddir *idp)
{
struct dirent *dp;
int cl, sl, assoc;
-/* $OpenBSD: iso.h,v 1.15 2013/05/30 17:35:01 guenther Exp $ */
+/* $OpenBSD: iso.h,v 1.16 2021/03/05 07:01:36 jsg Exp $ */
/* $NetBSD: iso.h,v 1.20 1997/07/07 22:45:34 cgd Exp $ */
/*-
/* 7.2.1: unsigned little-endian 16-bit value. NOT USED IN KERNEL. */
static __inline int
-isonum_721(p)
- u_char *p;
+isonum_721(u_char *p)
{
#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == LITTLE_ENDIAN)
return *(u_int16_t *)p;
/* 7.2.2: unsigned big-endian 16-bit value. NOT USED IN KERNEL. */
static __inline int
-isonum_722(p)
- unsigned char *p;
+isonum_722(unsigned char *p)
{
#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == BIG_ENDIAN)
return *(u_int16_t *)p;
/* 7.3.1: unsigned little-endian 32-bit value. NOT USED IN KERNEL. */
static __inline int
-isonum_731(p)
- u_char *p;
+isonum_731(u_char *p)
{
#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == LITTLE_ENDIAN)
return *(u_int32_t *)p;
/* 7.3.2: unsigned big-endian 32-bit value. NOT USED IN KERNEL. */
static __inline int
-isonum_732(p)
- unsigned char *p;
+isonum_732(unsigned char *p)
{
#if !defined(__STRICT_ALIGNMENT) && (BYTE_ORDER == BIG_ENDIAN)
return *(u_int32_t *)p;