At present, when the syscall mount returns the EINVAL error, current samba client tool just call strerror to print an error message like: "Invalid argument". which is actually different the EINVAL's usage for the system call of mount (it only means the source path is wrong) and may confuse the user. I checked the the ”mount“ command in util-linux package, and it well explained this error and other error type returned by the mount syscall. I think the client-tools can do similar thing as mount tool has done.
The mount(2) syscall just provides an error code, and no further info. The mount helper programs have no way to get additional info. It's quite typical for filesystems to return EINVAL when given mount options that make no sense. We do often pop a printk when that happens, and that will show up in dmesg.
(In reply to comment #1) > The mount(2) syscall just provides an error code, and no further info. The > mount helper programs have no way to get additional info. It's quite typical > for filesystems to return EINVAL when given mount options that make no sense. > We do often pop a printk when that happens, and that will show up in dmesg. > man mount(2): SYNOPSIS #include <sys/mount.h> int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data); EINVAL source had an invalid superblock. Or, a remount (MS_REMOUNT) was attempted, but source was not already mounted on target. Or, a move (MS_MOVE) was attempted, but source was not a mount point, or was '/'. It means source param is invalid, instead of data or target parameter. The "mount" command seems having tried to explain more about this error to help command line user. If mount.cifs can get this done, it would be helpful. Thanks.
(In reply to comment #1) > The mount(2) syscall just provides an error code, and no further info. The > mount helper programs have no way to get additional info. It's quite typical > for filesystems to return EINVAL when given mount options that make no sense. > We do often pop a printk when that happens, and that will show up in dmesg. > Or do you mean that the kernel implementation does not conform to the man mount(2)?