Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2019 01:42:31 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354368 - in head/usr.bin: brandelf head tail
Message-ID:  <201911060142.xA61gV5J091689@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Nov  6 01:42:30 2019
New Revision: 354368
URL: https://svnweb.freebsd.org/changeset/base/354368

Log:
  fileargs_init() sets errno on failure.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/usr.bin/brandelf/brandelf.c
  head/usr.bin/head/head.c
  head/usr.bin/tail/tail.c

Modified: head/usr.bin/brandelf/brandelf.c
==============================================================================
--- head/usr.bin/brandelf/brandelf.c	Tue Nov  5 21:38:48 2019	(r354367)
+++ head/usr.bin/brandelf/brandelf.c	Wed Nov  6 01:42:30 2019	(r354368)
@@ -135,7 +135,7 @@ main(int argc, char **argv)
 
 	fa = fileargs_init(argc, argv, flags, 0, &rights, FA_OPEN);
 	if (fa == NULL)
-		errx(1, "unable to init casper");
+		err(1, "unable to init casper");
 
 	caph_cache_catpages();
 	if (caph_limit_stdio() < 0 || caph_enter_casper() < 0)

Modified: head/usr.bin/head/head.c
==============================================================================
--- head/usr.bin/head/head.c	Tue Nov  5 21:38:48 2019	(r354367)
+++ head/usr.bin/head/head.c	Wed Nov  6 01:42:30 2019	(r354368)
@@ -117,7 +117,7 @@ main(int argc, char *argv[])
 	fa = fileargs_init(argc, argv, O_RDONLY, 0,
 	    cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL), FA_OPEN);
 	if (fa == NULL)
-		errx(1, "unable to init casper");
+		err(1, "unable to init casper");
 
 	caph_cache_catpages();
 	if (caph_limit_stdio() < 0 || caph_enter_casper() < 0)

Modified: head/usr.bin/tail/tail.c
==============================================================================
--- head/usr.bin/tail/tail.c	Tue Nov  5 21:38:48 2019	(r354367)
+++ head/usr.bin/tail/tail.c	Wed Nov  6 01:42:30 2019	(r354368)
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
 
 	fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
 	if (fa == NULL)
-		errx(1, "unable to init casper");
+		err(1, "unable to init casper");
 
 	caph_cache_catpages();
 	if (caph_enter_casper() < 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911060142.xA61gV5J091689>