truss: if file requested with -o flag could not be opened print the reason

MFC after:	3 days
This commit is contained in:
Mateusz Guzik 2013-01-27 03:14:54 +00:00
parent ecfc48a031
commit 8ff44cbb80
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245956

View File

@ -235,7 +235,7 @@ main(int ac, char **av)
if (fname != NULL) { /* Use output file */
if ((trussinfo->outfile = fopen(fname, "w")) == NULL)
errx(1, "cannot open %s", fname);
err(1, "cannot open %s", fname);
/*
* Set FD_CLOEXEC, so that the output file is not shared with
* the traced process.