kldload(2) smbfs failed in -CURRENT but kernel function returns 0

Tai-hwa Liang avatar at mmlab.cse.yzu.edu.tw
Wed Sep 1 03:35:38 PDT 2004


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 at smbshare/upload /mnt
mount_smbfs: kldload(smbfs): No such file or directory
f22 /root# mount_smbfs //user at 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


More information about the freebsd-current mailing list