kernels/linux-2.4.0/fs/smbfs/proc.c
/* Handles all changes to codepage settings. */
Handles all changes to codepage settings.
Handles all changes to codepage settings .
int smb_setcodepage(struct smb_sb_info *server, struct smb_nls_codepage *cp)
{
	int n;
	smb_lock_server(server);
	n = setcodepage(server, &server->local_nls, cp->local_name);
	if (n != 0)
		goto out;
	n = setcodepage(server, &server->remote_nls, cp->remote_name);
	if (n != 0)
		setcodepage(server, &server->local_nls, NULL);
out:
	if (server->local_nls != NULL && server->remote_nls != NULL)
		server->convert = convert_cp;
	else
		server->convert = convert_memcpy;
	smb_unlock_server(server);
	return n;
}
int smb_setcodepage ( struct smb_sb_info * server , struct smb_nls_codepage * cp ) { int n ; smb_lock_server ( server ) ; n = setcodepage ( server , & server -> local_nls , cp -> local_name ) ; if ( n != 0 ) goto out ; n = setcodepage ( server , & server -> remote_nls , cp -> remote_name ) ; if ( n != 0 ) setcodepage ( server , & server -> local_nls , NULL ) ; out : if ( server -> local_nls != NULL && server -> remote_nls != NULL ) server -> convert = convert_cp ; else server -> convert = convert_memcpy ; smb_unlock_server ( server ) ; return n ; }
Handles all changes to codepage settings.
Handles all changes to codepage settings .