CR - CR+LF automatic interpretation using smbmount

Urban Widmark urban at
Thu Jan 25 18:48:56 GMT 2001

On Thu, 25 Jan 2001, Andrés Seco Hernández wrote:

> I need to mount permanently a shared resource from a windows machine in a
> linux computer using smbmount. I have some processes in the linux that
> generates text files that need to be used from windows.

Some windows programs generate LF-only files, others CRLF ... some
understand both others are confused.

> Can i do the same with smbmount? i do not find this option in smbmount.

You can not do that in smbmount.

The mount option you are thinking about is the conv=binary/text/auto ?
binary - no conversion
text - treat everything as text
auto - make a guess based on the filename

You could try and copy bits of code from fs/fat/file.c to fs/smbfs/file.c
in a 2.2 kernel source. The conversion gets ugly because the length of the
data changes, for example you need to handle the case where the last
character written is LF and expands to CRLF (but you only send CR to the
server in this call and have to remember that the next write should start
with a LF ... and if there is no write following this it needs to be sent

In 2.4.0 the CRLF/LF code appears to have been removed from the fat code.
I think I know why.

Why not just use editors that understand LF files/CRLF files or use some
conversion program?


More information about the samba mailing list