NetBSD Problem Report #3335

Received: (qmail-queue invoked from smtpd); 15 Mar 1997 14:10:13 -0000
Message-Id: <199703151406.PAA02715@zelz26.zel.kfa-juelich.de>
Date: Sat, 15 Mar 1997 15:06:30 +0100 (MET)
From: Matthias Drochner <drochner@zelz26.zel.kfa-juelich.de>
Reply-To: drochner@zelux6.zel.kfa-juelich.de
To: gnats-bugs@gnats.netbsd.org
Subject: optional size reduction in sys/lib/libsa/nfs.c
X-Send-Pr-Version: 3.95

>Number:         3335
>Category:       misc
>Synopsis:       sometimes every byte of ROM space is valuable
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 15 06:20:02 +0000 1997
>Closed-Date:    Mon Jun 16 20:49:28 +0000 1997
>Last-Modified:  Mon Jun 16 20:51:15 +0000 1997
>Originator:     Matthias Drochner
>Release:        NetBSD-current
>Organization:
	KFA Juelich
>Environment:
	NetBSD-current, i386
System: NetBSD zelz26 1.2C NetBSD 1.2C (TULIP2) #1: Tue Mar 11 16:31:29 MET 1997 drochner@zelz26:/home/drochner/netbsd-970206/sys/arch/i386/compile/TULIP2 i386


>Description:
	When some bytes decide if a program fits into a ROM, one looks for
places where to save space. There are probably more places in libsa where some
bytes can be squeezed out, but symlink support in NFS makes a difference of more
than 700 bytes on the i386. Depending on the setup, symlinks might be no big
gain because they point into filesystems which are not mounted by the bootloader.
The appended patches put the NFS symlink support into conditionals
"#ifndef NFS_NOSYMLINK".
>How-To-Repeat:
	Try to make a 32k BOOT EPROM with RARP/BOOTPARAM/NFS and compression
support.
>Fix:
*** /zelnfs/p3/drochner/netbsd-current/src/sys/lib/libsa/nfs.c  Fri Dec 27 13:19:51 1996
--- nfs.c       Tue Mar 11 15:12:53 1997
***************
*** 82,85 ****
--- 82,86 ----
  };

+ #ifndef NFS_NOSYMLINK
  struct nfs_readlnk_repl {
        n_long  errno;
***************
*** 87,90 ****
--- 88,92 ----
        char    path[NFS_MAXPATHLEN];
  };
+ #endif

  struct nfs_iodesc {
***************
*** 227,230 ****
--- 229,233 ----
  }

+ #ifndef NFS_NOSYMLINK
  /*
   * Get the destination of a symbolic link.
***************
*** 271,274 ****
--- 274,278 ----
        return (0);
  }
+ #endif

  /*
***************
*** 382,385 ****
--- 386,390 ----
  {
        struct nfs_iodesc *newfd, *currfd;
+ #ifndef NFS_NOSYMLINK
        register char *cp, *ncp;
        register int c;
***************
*** 387,390 ****
--- 392,396 ----
        char linkbuf[NFS_MAXPATHLEN + 1];
        int nlinks = 0;
+ #endif
        int error = 0;

***************
*** 401,404 ****
--- 407,411 ----
        newfd = 0;

+ #ifndef NFS_NOSYMLINK
        cp = path;
        while (*cp) {
***************
*** 495,498 ****
--- 502,513 ----

  out:
+ #else
+       /* allocate file system specific data structure */
+       currfd = alloc(sizeof(*currfd));
+       currfd->iodesc = nfs_root_node.iodesc;
+       currfd->off = 0;
+
+       error = nfs_lookupfh(&nfs_root_node, path, currfd);
+ #endif
        if (!error) {
                f->f_fsdata = (void *)currfd;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: drochner 
State-Changed-When: Mon Jun 16 13:49:28 PDT 1997 
State-Changed-Why:  
integrated 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.