Use warn() instead of perror().

This commit is contained in:
Tim J. Robbins 2004-07-20 05:52:00 +00:00
parent f9d9941f2d
commit 2c61418d05
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132433
2 changed files with 4 additions and 4 deletions

View File

@ -298,11 +298,11 @@ udom_open(const char *path, int flags)
switch(flags & O_ACCMODE) {
case O_RDONLY:
if (shutdown(fd, SHUT_WR) == -1)
perror("cat");
warn(NULL);
break;
case O_WRONLY:
if (shutdown(fd, SHUT_RD) == -1)
perror("cat");
warn(NULL);
break;
default:
break;

View File

@ -785,7 +785,7 @@ label(KINFO *k, VARENT *ve)
v = ve->var;
string = NULL;
if (mac_prepare_process_label(&proclabel) == -1) {
perror("mac_prepare_process_label");
warn("mac_prepare_process_label");
goto out;
}
error = mac_get_pid(k->ki_p->ki_pid, proclabel);
@ -811,7 +811,7 @@ s_label(KINFO *k)
int error, size = 0;
if (mac_prepare_process_label(&proclabel) == -1) {
perror("mac_prepare_process_label");
warn("mac_prepare_process_label");
return (0);
}
error = mac_get_pid(k->ki_p->ki_pid, proclabel);