Put back the error checking in wtfs() that was lost when newfs was
changed to use libufs in revision 1.71. Without this, any write failures in newfs were silently ignored. Note that this will display a meaningless errno string in the case of a short write as opposed to a write error, since bwrite()'s return value does not allow the caller to determine if errno is valid. Reported by: Lukas Ertl <l.ertl@univie.ac.at> Reviewed by: jmallett Approved by: re (bmah)
This commit is contained in:
parent
969bab3efb
commit
7bdf1805b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114877
@ -849,7 +849,8 @@ wtfs(ufs2_daddr_t bno, int size, char *bf)
|
||||
{
|
||||
if (Nflag)
|
||||
return;
|
||||
bwrite(&disk, bno, bf, size);
|
||||
if (bwrite(&disk, bno, bf, size) < 0)
|
||||
err(36, "wtfs: %d bytes at sector %jd", size, (intmax_t)bno);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user