Module Name:    src
Committed By:   rin
Date:           Sat Jun 29 07:49:36 UTC 2024

Modified Files:
        src/sys/lib/libsa: nfs.c

Log Message:
libsa/nfs.c: Add `LIBSA_NFS_IMPLICIT_MOUNT` compile-time option

by which nfs_mount() is automatically called from nfs_open(),
as done for nfs.c in i386/stand.

This is only functional difference b/w two copies of nfs.c.
Now, we can safely retire the latter.

XXX
It would be really nice to drop this option also. However,
unfortunately, it is too much for me at the very moment...


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/lib/libsa/nfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libsa/nfs.c
diff -u src/sys/lib/libsa/nfs.c:1.52 src/sys/lib/libsa/nfs.c:1.53
--- src/sys/lib/libsa/nfs.c:1.52	Thu Dec 14 05:39:00 2023
+++ src/sys/lib/libsa/nfs.c	Sat Jun 29 07:49:36 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs.c,v 1.52 2023/12/14 05:39:00 rin Exp $	*/
+/*	$NetBSD: nfs.c,v 1.53 2024/06/29 07:49:36 rin Exp $	*/
 
 /*-
  *  Copyright (c) 1993 John Brezak
@@ -605,6 +605,11 @@ nfs_open(const char *path, struct open_f
 		printf("%s: %s\n", __func__, path);
 #endif
 
+#ifdef LIBSA_NFS_IMPLICIT_MOUNT
+	if (nfs_mount(*((int *)(f->f_devdata)), rootip, rootpath))
+		return errno;
+#endif
+
 	if (nfs_root_node.iodesc == NULL) {
 		printf("%s: must mount first.\n", __func__);
 		return ENXIO;

Reply via email to