Fix two minor nits.
Existences revealed, but no details offered by: bp
This commit is contained in:
parent
d2a57575f1
commit
aadf265525
@ -200,7 +200,8 @@ devfs_newdirent(char *name, int namelen)
|
||||
de->de_dirent = (struct dirent *)(de + 1);
|
||||
de->de_dirent->d_namlen = namelen;
|
||||
de->de_dirent->d_reclen = GENERIC_DIRSIZ(&d);
|
||||
bcopy(name, de->de_dirent->d_name, namelen + 1);
|
||||
bcopy(name, de->de_dirent->d_name, namelen);
|
||||
de->de_dirent->d_name[namelen] = '\0';
|
||||
nanotime(&de->de_ctime);
|
||||
de->de_mtime = de->de_atime = de->de_ctime;
|
||||
de->de_links = 1;
|
||||
|
@ -153,7 +153,10 @@ devfs_getattr(ap)
|
||||
vap->va_uid = de->de_uid;
|
||||
vap->va_gid = de->de_gid;
|
||||
vap->va_mode = de->de_mode;
|
||||
vap->va_size = 0;
|
||||
if (vp->v_type == VLNK)
|
||||
vap->va_size = de->de_dirent->d_namlen;
|
||||
else
|
||||
vap->va_size = 0;
|
||||
vap->va_blocksize = DEV_BSIZE;
|
||||
vap->va_type = vp->v_type;
|
||||
if (vp->v_type != VCHR) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user