From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 10 Apr 2019 08:19:44 -0400 Subject: [U-Boot] [U-Boot, RESEND, v5, 5/7] fs: ext4: Add support for the creation of symbolic links In-Reply-To: <20190213111527.1525-6-jjhiblot@ti.com> References: <20190213111527.1525-6-jjhiblot@ti.com> Message-ID: <20190410121944.GH4664@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Feb 13, 2019 at 12:15:25PM +0100, Jean-Jacques Hiblot wrote: > Re-use the functions used to write/create a file, to support creation of a > symbolic link. > The difference with a regular file are small: > - The inode mode is flagged with S_IFLNK instead of S_IFREG > - The ext2_dirent's filetype is FILETYPE_SYMLINK instead of FILETYPE_REG > - Instead of storing the content of a file in allocated blocks, the path > to the target is stored. And if the target's path is short enough, no block > is allocated and the target's path is stored in ext2_inode.b.symlink > > As with regulars files, if a file/symlink with the same name exits, it is > unlinked first and then re-created. > > Signed-off-by: Jean-Jacques Hiblot > Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: