Subject: Re: mount -rt ntfs
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 11/16/2003 18:32:47
On Sun, 16 Nov 2003 22:37:27 +0000, David Laight <david@l8s.co.uk> wrote:
> > 
> > # mount -r -t ntfs /dev/sd0e /mnt
> > mount_ntfs: /dev/sd0e on /mnt: Argument list too long
> > 
> > (Note to writers of error messages: "Argument list too long" doesn't
> > tell me what arguments, and isn't a documented diagnostic.)
> 
> Mount usually fails EINVAL!
> You might need to build a kernel with additional error reporting
> in order to find what the problem really is!
> A quick look at src/sys/fs/ntfs shows E2BIG being returned in a couple
> of places - but not in ntfs_vfsops.c, both have an associated printf().

Oh, harumph, harumph!  How come I didn't put 2 + 2 together!?  

In dealing with GNU libiconv, I've had to learn a little about its errno
codes.  One of them is E2BIG, which in iconv(3) terms means the output
buffer was too small to hold a complete rendition of the input buffer. 
But calling perror(3) or strerror(3) is very misleading, because the
associated message is "Arg list too long".  

I don't know what the governing standards, etc., say, but it's clear that
E2BIG sometimes means something besides what intro(2) says it does.  

Before rebuilding ye olde kernel, I looked in /var/log/messages.  Lo and
behold:

sudo: jklowden : TTY=ttyp1 ; PWD=/mnt ; USER=root ; COMMAND=/sbin/mount -r
-t ntfs /dev/sd0e /mnt
/netbsd: sd0: no disk label
/netbsd: ntfs_readntvattr_plain: POSSIBLE RUN ERROR
/netbsd: ntfs_readattr_plain: ntfs_readntvattr_plain failed: o: 0, s:
131536
/netbsd: ntfs_readattr_plain: attrib: 0 - 32

As my father used to say: Now I know as much as I did before.  

Thanks for the hint.  It sounds like the driver doesn't like my
filesystem.  Funny, I have several and they all fail the same way.  I
assumed I didn't know what I was doing.  

--jkl