fscrypt_fname_disk_to_usr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to the fscrypt_fname_disk_to_usr(9) page from the Kernel API Manual ✨ the whole serve here is: convert an encrypted filename to user-presentable form. that's it, that's the main character πŸ’…

✨ SYNOPSIS ✨

int fscrypt_fname_disk_to_usr (const struct inode *inode , u32 hash ,
       u32 minor_hash , const struct fscrypt_str *iname , struct fscrypt_str
       *oname );

πŸŽ€ ARGUMENTS πŸŽ€

  • inode β€” the inode of the parent directory for regular filenames, or the inode of the symlink for symlink targets 🫢
  • hash β€” first part of the name's dirhash, if applicable. this lowkey only needs to be provided if the filename is located in an indexed directory whose encryption key may be unavailable. not needed for symlink targets, periodt.
  • minor_hash β€” second part of the name's dirhash, if applicable ✨
  • iname β€” the encrypted filename to convert. it may also be . or .., which aren't actually encrypted πŸ‘€
  • oname β€” output buffer for the user-presentable filename. the caller must have allocated enough space for this, e.g. using fscrypt_fname_alloc_buffer πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

if the key is available, we'll decrypt the disk name. otherwise, we'll encode it for presentation in fscrypt_nokey_name format. see struct fscrypt_nokey_name for details, iykyk 🧚

🌈 RETURN 🌈

returns 0 on success, and -errno on failure. simple as that, no cap 😌

πŸ‘‘ SEE ALSO πŸ‘‘


xoxo bestie πŸ’– source/version: ./fs/crypto; date: October 2026; page: fscrypt_fname_disk_to_usr(9) πŸŽ€

πŸ“¦ where this page comes from