From 38cc2a5caa81924c60a3cb6a6dc50aefa7c2ef51 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Tue, 13 Feb 2007 01:28:48 +0000 Subject: [PATCH] Make vfs_getopts() set *error to ENOENT if the option wasn't found, so that consumers don't have to check for both error and the return value (some of them actually don't do it). MFC After: 1 week --- sys/kern/vfs_mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 8604e31606a3..09ac9ad94d48 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1798,6 +1798,7 @@ vfs_getopts(struct vfsoptlist *opts, const char *name, int *error) } return (opt->value); } + *error = ENOENT; return (NULL); }