diff options
| author | kre <kre@NetBSD.org> | 2023-05-25 17:37:05 +0000 |
|---|---|---|
| committer | kre <kre@NetBSD.org> | 2023-05-25 17:37:05 +0000 |
| commit | a2c126e1eeb7bb5d5b6d9ecb05e227421df88dfb (patch) | |
| tree | 1810587337b7349eca47b0b6690b8edac0da0ba5 /sbin | |
| parent | 2419f83e8000c24fdefe0f5ea5f5952773dfc1bf (diff) | |
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 tlaronde@polynum.com
XXX - pullup -10 (others?)
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/mount/pathadj.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/mount/pathadj.c b/sbin/mount/pathadj.c index 649773ea61e..40658d7ea76 100644 --- a/sbin/mount/pathadj.c +++ b/sbin/mount/pathadj.c @@ -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); |
