Andrés Seco Hernández
2001-Jan-25 17:27 UTC
CR - CR+LF automatic interpretation using smbmount
Hi all 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. I know mount has an automatic option to read text files as they have only CR from linux computers, but saves it with CR-LF if the partition is FAT. Can i do the same with smbmount? i do not find this option in smbmount. Thanks a lot.> ______________________________________________ >Andr?s Seco Hern?ndez. <AndresSeco@CajaGuadalajara.es> personal: AndresSH@ctv.es, http://www.ctv.es/USERS/andressh Clave p?blica PGP en http://www.rediris.es/cert/servicios/keyserver/ Microsoft Certified Product Specialist MCP ID 445900 Debian GNU Linux 2.2 (potato) - Linux Registered User no. 113867 tel. +34 629 867165, +34 949 888139, fax +34 949 888105. Organizaci?n y Medios. Caja de Guadalajara. http://www.CajaGuadalajara.es> ______________________________________________
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 anyway) 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? /Urban
Andrés Seco Hernández
2001-Jan-25 18:52 UTC
CR - CR+LF automatic interpretation using smbmount
Currently we have a conversion program, but, if that can be an automatic feature, i do not know what to delete that code. What was the reason to remove that code from 2.4.0?> ______________________________________________ >Andr?s Seco Hern?ndez. <AndresSeco@CajaGuadalajara.es> personal: AndresSH@ctv.es, http://www.ctv.es/USERS/andressh Clave p?blica PGP en http://www.rediris.es/cert/servicios/keyserver/ Microsoft Certified Product Specialist MCP ID 445900 Debian GNU Linux 2.2 (potato) - Linux Registered User no. 113867 tel. +34 629 867165, +34 949 888139, fax +34 949 888105. Organizaci?n y Medios. Caja de Guadalajara. http://www.CajaGuadalajara.es> ______________________________________________ > > ---------- > From: Urban Widmark[SMTP:urban@teststation.com] > Sent: jueves 25 de enero de 2001 19:48 > To: Andr?s Seco Hern?ndez > Cc: 'samba@lists.samba.org' > Subject: Re: CR - CR+LF automatic interpretation using smbmount > > 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 > anyway) > > 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? > > /Urban >