version 1.4.2.6, 2004/10/27 06:48:23 |
version 1.4.2.7, 2005/03/04 16:51:29 |
Line 207 iso_dunmap(device) |
|
Line 207 iso_dunmap(device) |
|
{ |
{ |
struct idvhashhead *dpp; |
struct idvhashhead *dpp; |
struct iso_dnode *dp, *dq; |
struct iso_dnode *dp, *dq; |
|
|
for (dpp = idvhashtbl; dpp <= idvhashtbl + idvhash; dpp++) { |
for (dpp = idvhashtbl; dpp <= idvhashtbl + idvhash; dpp++) { |
for (dp = LIST_FIRST(dpp); dp != NULL; dp = dq) { |
for (dp = LIST_FIRST(dpp); dp != NULL; dp = dq) { |
dq = LIST_NEXT(dp, d_hash); |
dq = LIST_NEXT(dp, d_hash); |
Line 295 cd9660_inactive(v) |
|
Line 295 cd9660_inactive(v) |
|
struct lwp *l = ap->a_l; |
struct lwp *l = ap->a_l; |
struct iso_node *ip = VTOI(vp); |
struct iso_node *ip = VTOI(vp); |
int error = 0; |
int error = 0; |
|
|
if (prtactive && vp->v_usecount != 0) |
if (prtactive && vp->v_usecount != 0) |
vprint("cd9660_inactive: pushing active", vp); |
vprint("cd9660_inactive: pushing active", vp); |
|
|
ip->i_flag = 0; |
ip->i_flag = 0; |
VOP_UNLOCK(vp, 0); |
VOP_UNLOCK(vp, 0); |
/* |
/* |
Line 323 cd9660_reclaim(v) |
|
Line 323 cd9660_reclaim(v) |
|
} */ *ap = v; |
} */ *ap = v; |
struct vnode *vp = ap->a_vp; |
struct vnode *vp = ap->a_vp; |
struct iso_node *ip = VTOI(vp); |
struct iso_node *ip = VTOI(vp); |
|
|
if (prtactive && vp->v_usecount != 0) |
if (prtactive && vp->v_usecount != 0) |
vprint("cd9660_reclaim: pushing active", vp); |
vprint("cd9660_reclaim: pushing active", vp); |
/* |
/* |
Line 356 cd9660_defattr(isodir, inop, bp) |
|
Line 356 cd9660_defattr(isodir, inop, bp) |
|
struct iso_mnt *imp; |
struct iso_mnt *imp; |
struct iso_extended_attributes *ap = NULL; |
struct iso_extended_attributes *ap = NULL; |
int off; |
int off; |
|
|
if (isonum_711(isodir->flags)&2) { |
if (isonum_711(isodir->flags)&2) { |
inop->inode.iso_mode = S_IFDIR; |
inop->inode.iso_mode = S_IFDIR; |
/* |
/* |
Line 377 cd9660_defattr(isodir, inop, bp) |
|
Line 377 cd9660_defattr(isodir, inop, bp) |
|
} |
} |
if (bp) { |
if (bp) { |
ap = (struct iso_extended_attributes *)bp->b_data; |
ap = (struct iso_extended_attributes *)bp->b_data; |
|
|
if (isonum_711(ap->version) == 1) { |
if (isonum_711(ap->version) == 1) { |
if (!(ap->perm[1]&0x10)) |
if (!(ap->perm[1]&0x10)) |
inop->inode.iso_mode |= S_IRUSR; |
inop->inode.iso_mode |= S_IRUSR; |
Line 419 cd9660_deftstamp(isodir,inop,bp) |
|
Line 419 cd9660_deftstamp(isodir,inop,bp) |
|
struct iso_mnt *imp; |
struct iso_mnt *imp; |
struct iso_extended_attributes *ap = NULL; |
struct iso_extended_attributes *ap = NULL; |
int off; |
int off; |
|
|
if (!bp |
if (!bp |
&& ((imp = inop->i_mnt)->im_flags & ISOFSMNT_EXTATT) |
&& ((imp = inop->i_mnt)->im_flags & ISOFSMNT_EXTATT) |
&& (off = isonum_711(isodir->ext_attr_length))) { |
&& (off = isonum_711(isodir->ext_attr_length))) { |
Line 429 cd9660_deftstamp(isodir,inop,bp) |
|
Line 429 cd9660_deftstamp(isodir,inop,bp) |
|
} |
} |
if (bp) { |
if (bp) { |
ap = (struct iso_extended_attributes *)bp->b_data; |
ap = (struct iso_extended_attributes *)bp->b_data; |
|
|
if (isonum_711(ap->version) == 1) { |
if (isonum_711(ap->version) == 1) { |
if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime)) |
if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime)) |
cd9660_tstamp_conv17(ap->ctime,&inop->inode.iso_atime); |
cd9660_tstamp_conv17(ap->ctime,&inop->inode.iso_atime); |
Line 456 cd9660_tstamp_conv7(pi,pu) |
|
Line 456 cd9660_tstamp_conv7(pi,pu) |
|
{ |
{ |
int crtime, days; |
int crtime, days; |
int y, m, d, hour, minute, second, tz; |
int y, m, d, hour, minute, second, tz; |
|
|
y = pi[0] + 1900; |
y = pi[0] + 1900; |
m = pi[1]; |
m = pi[1]; |
d = pi[2]; |
d = pi[2]; |
Line 464 cd9660_tstamp_conv7(pi,pu) |
|
Line 464 cd9660_tstamp_conv7(pi,pu) |
|
minute = pi[4]; |
minute = pi[4]; |
second = pi[5]; |
second = pi[5]; |
tz = pi[6]; |
tz = pi[6]; |
|
|
if (y < 1970) { |
if (y < 1970) { |
pu->tv_sec = 0; |
pu->tv_sec = 0; |
pu->tv_nsec = 0; |
pu->tv_nsec = 0; |
Line 482 cd9660_tstamp_conv7(pi,pu) |
|
Line 482 cd9660_tstamp_conv7(pi,pu) |
|
days = 367*(y-1960)-7*(y+(m+9)/12)/4-3*((y+(m+9)/12-1)/100+1)/4+275*m/9+d-239; |
days = 367*(y-1960)-7*(y+(m+9)/12)/4-3*((y+(m+9)/12-1)/100+1)/4+275*m/9+d-239; |
#endif |
#endif |
crtime = ((((days * 24) + hour) * 60 + minute) * 60) + second; |
crtime = ((((days * 24) + hour) * 60 + minute) * 60) + second; |
|
|
/* timezone offset is unreliable on some disks */ |
/* timezone offset is unreliable on some disks */ |
if (-48 <= tz && tz <= 52) |
if (-48 <= tz && tz <= 52) |
crtime -= tz * 15 * 60; |
crtime -= tz * 15 * 60; |
Line 498 cd9660_chars2ui(begin,len) |
|
Line 498 cd9660_chars2ui(begin,len) |
|
int len; |
int len; |
{ |
{ |
u_int rc; |
u_int rc; |
|
|
for (rc = 0; --len >= 0;) { |
for (rc = 0; --len >= 0;) { |
rc *= 10; |
rc *= 10; |
rc += *begin++ - '0'; |
rc += *begin++ - '0'; |
Line 512 cd9660_tstamp_conv17(pi,pu) |
|
Line 512 cd9660_tstamp_conv17(pi,pu) |
|
struct timespec *pu; |
struct timespec *pu; |
{ |
{ |
u_char buf[7]; |
u_char buf[7]; |
|
|
/* year:"0001"-"9999" -> -1900 */ |
/* year:"0001"-"9999" -> -1900 */ |
buf[0] = cd9660_chars2ui(pi,4) - 1900; |
buf[0] = cd9660_chars2ui(pi,4) - 1900; |
|
|
/* month: " 1"-"12" -> 1 - 12 */ |
/* month: " 1"-"12" -> 1 - 12 */ |
buf[1] = cd9660_chars2ui(pi + 4,2); |
buf[1] = cd9660_chars2ui(pi + 4,2); |
|
|
/* day: " 1"-"31" -> 1 - 31 */ |
/* day: " 1"-"31" -> 1 - 31 */ |
buf[2] = cd9660_chars2ui(pi + 6,2); |
buf[2] = cd9660_chars2ui(pi + 6,2); |
|
|
/* hour: " 0"-"23" -> 0 - 23 */ |
/* hour: " 0"-"23" -> 0 - 23 */ |
buf[3] = cd9660_chars2ui(pi + 8,2); |
buf[3] = cd9660_chars2ui(pi + 8,2); |
|
|
/* minute:" 0"-"59" -> 0 - 59 */ |
/* minute:" 0"-"59" -> 0 - 59 */ |
buf[4] = cd9660_chars2ui(pi + 10,2); |
buf[4] = cd9660_chars2ui(pi + 10,2); |
|
|
/* second:" 0"-"59" -> 0 - 59 */ |
/* second:" 0"-"59" -> 0 - 59 */ |
buf[5] = cd9660_chars2ui(pi + 12,2); |
buf[5] = cd9660_chars2ui(pi + 12,2); |
|
|
/* difference of GMT */ |
/* difference of GMT */ |
buf[6] = pi[16]; |
buf[6] = pi[16]; |
|
|
return cd9660_tstamp_conv7(buf,pu); |
return cd9660_tstamp_conv7(buf,pu); |
} |
} |
|
|