Hi, On Mon, Oct 24, 2016 at 11:47:06AM +0800, Sheng Yong wrote: > Hi, Jaegeuk, > > On 10/24/2016 10:16 AM, Sheng Yong wrote: > > If fscrypt is enabled, we need to convert the encrypted file name before > > printing it. So let's export convert_encrypted_name for other functions, > > and make it returns the length of converted string. > > This patch also changes the parameter of file_is_encrypt to f2fs_inode. > > > [...] > > -static void convert_encrypted_name(unsigned char *name, int len, > > +int convert_encrypted_name(unsigned char *name, int len, > > unsigned char *new, int encrypted) > > { > > if (!encrypted) { > > memcpy(new, name, len); > > new[len] = 0; > > - return; > > + return len; > > } > > > > *new = '_'; > > - digest_encode((const char *)name, 24, (char *)new + 1); > > + return digest_encode((const char *)name, 24, (char *)new + 1); > I'm confused about the parameter "24" here. Why it is not the length of > the cipher text?
It's just to sync with fscrypt_fname_disk_to_usr which uses 24 bytes for the encrypted name without a key. > > thanks, > Sheng > > } > [...] > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel