From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762232AbcALNjH (ORCPT ); Tue, 12 Jan 2016 08:39:07 -0500 Received: from mx2.suse.de ([195.135.220.15]:55171 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752805AbcALNjF (ORCPT ); Tue, 12 Jan 2016 08:39:05 -0500 Date: Tue, 12 Jan 2016 14:39:15 +0100 From: Jan Kara To: Andrew Gabbasov Cc: "'Jan Kara'" , Jan Kara , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/7] udf: Remove struct ustr as non-needed intermediate storage Message-ID: <20160112133915.GV6262@quack.suse.cz> References: <1450974338-22762-1-git-send-email-andrew_gabbasov@mentor.com> <1450974338-22762-7-git-send-email-andrew_gabbasov@mentor.com> <20160104123233.GB13014@quack.suse.cz> <000001d14c74$679154b0$36b3fe10$@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001d14c74$679154b0$36b3fe10$@mentor.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On Mon 11-01-16 16:31:40, Andrew Gabbasov wrote: > > > > > > - ocu[length - 1] = (uint8_t)u_len + 1; > > > - return u_len + 1; > > > + return u_len; > > > > It seems you removed setting of the length in the resulting CS0 string. > > Yes, and it was done deliberately. > udf_name_to_CS0 and its caller udf_put_filename functions are used for > writing File Identifier fields only, which are not "dstrings", that is > not containing the length in last byte. The last byte with the length > from these functions would not be copied to filesystem or used in any > other way. I see, you are right. OK. Honza -- Jan Kara SUSE Labs, CR