Module Name: src
Committed By: kre
Date: Thu May 25 17:37:05 UTC 2023
Modified Files:
src/sbin/mount: pathadj.c
Log Message:
pathadj() is required to succeed. If it cannot, simply issuing a
warning and continuing is not good enough. Change the warning to
an error (and hence immediate exit) instead, that's all we can do.
Problem pointed out by [email protected]
XXX - pullup -10 (others?)
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/mount/pathadj.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/mount/pathadj.c
diff -u src/sbin/mount/pathadj.c:1.3 src/sbin/mount/pathadj.c:1.4
--- src/sbin/mount/pathadj.c:1.3 Sun Jul 26 08:20:22 2020
+++ src/sbin/mount/pathadj.c Thu May 25 17:37:05 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pathadj.c,v 1.3 2020/07/26 08:20:22 mlelstv Exp $ */
+/* $NetBSD: pathadj.c,v 1.4 2023/05/25 17:37:05 kre Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation. All Rights Reserved.
@@ -37,10 +37,8 @@ void
pathadj(const char *input, char *adjusted)
{
- if (realpath(input, adjusted) == NULL) {
- warn("Warning: realpath %s", input);
- return;
- }
+ if (realpath(input, adjusted) == NULL)
+ err(EXIT_FAILURE, "realpath '%s' failed", input);
if (input[0] != '/') {
warnx("\"%s\" is a relative path.", input);