From owner-freebsd-current@FreeBSD.ORG Wed Sep 1 10:35:38 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B4A916A4CE for ; Wed, 1 Sep 2004 10:35:38 +0000 (GMT) Received: from www.mmlab.cse.yzu.edu.tw (www.mmlab.cse.yzu.edu.tw [140.138.145.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 947CE43D2D for ; Wed, 1 Sep 2004 10:35:36 +0000 (GMT) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: by www.mmlab.cse.yzu.edu.tw (qmail, from userid 1000) id A67BB4EFCD6; Wed, 1 Sep 2004 18:35:32 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by www.mmlab.cse.yzu.edu.tw (qmail) with ESMTP id 9CC754EFCCF for ; Wed, 1 Sep 2004 18:35:32 +0800 (CST) Date: Wed, 1 Sep 2004 18:35:32 +0800 (CST) From: Tai-hwa Liang To: current@freebsd.org Message-ID: <04090118343018.53624@www.mmlab.cse.yzu.edu.tw> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: kldload(2) smbfs failed in -CURRENT but kernel function returns 0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 10:35:38 -0000 Greetings, Apparently the first time mount_smbfs was executed, smbfs related modules will be loaded by kldload(2); however, the result of the first kldload(2) was always ENOENT even if smbfs.ko was successfully loaded. Only the later run of mount_smbfs works. It also interesting since manually "kldload smbfs" or even load smbfs in /boot/loader.conf never run into ENOENT error. Furthermore, according to various debugging printf() inserted in kldload() or linker_load_module(), the return code is definitely zero. Any ideas about how this could happen? f22 /root# mount_smbfs //user@smbshare/upload /mnt mount_smbfs: kldload(smbfs): No such file or directory f22 /root# mount_smbfs //user@smbshare/upload /mnt Password: relevant ktrace information: 598 mount_smbfs CALL kldload(0x80496a6) 598 mount_smbfs NAMI "/boot/kernel/linker.hints" 598 mount_smbfs NAMI "/boot/kernel/smbfs" 598 mount_smbfs NAMI "/boot/kernel/smbfs.ko" 598 mount_smbfs NAMI "/boot/kernel/smbfs.ko" 598 mount_smbfs NAMI "/boot/kernel/linker.hints" 598 mount_smbfs NAMI "/boot/kernel/libiconv.ko" 598 mount_smbfs NAMI "/boot/kernel/libiconv.ko" 598 mount_smbfs NAMI "/boot/kernel/linker.hints" 598 mount_smbfs NAMI "/boot/kernel/libmchain.ko" 598 mount_smbfs NAMI "/boot/kernel/libmchain.ko" 598 mount_smbfs RET kldload 18/0x12 598 mount_smbfs CALL fstat(0x1,0xbfbfd990) 598 mount_smbfs RET fstat 0 598 mount_smbfs CALL ioctl(0x1,TIOCGETA,0xbfbfd9d0) 598 mount_smbfs RET ioctl 0 598 mount_smbfs CALL write(0x1,0x804d000,0xa) 598 mount_smbfs GIO fd 1 wrote 10 bytes "error = 2 " 598 mount_smbfs RET write 10/0xa