[linux-cifs-client] [PATCH 0/2] [CIFS] cleanup code by moving often repeated code sequence into a separate function

Günter Kukkukk linux at kukkukk.com
Thu May 29 00:38:29 GMT 2008


there are many places in cifssmb.c, where filenames have to
be setup for ucs (MS unicode) or ascii (nls codepage) representation.

In a first step move all repeating code sequences, which use 
  - cifsConvertToUCS() 
to a new function
  - setup_ucs_nls_name()

Then move all repeating code sequences, which use
  - cifs_strtoUCS()
to the new function
  - setup_ucs_nls_name()
passing the "remap" parameter as "0" (false).

There are still places left, which cannot easily moved
the same way.
In a future step cifs should be enhanced to also support codepages
for legacy servers (similar to the smbfs implementation). This could
best be done at "a single point" in the code path. Further cleanup
needs to be done.

Günter Kukkukk

-- 
Signed-off-by: Günter Kukkukk <linux at kukkukk.com>


More information about the linux-cifs-client mailing list