summaryrefslogtreecommitdiffstats
path: root/fs/ubootvarfs.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename struct fs_driver_d to fs_driverSascha Hauer2023-01-101-1/+1
| | | | | | | | | Remove the meaningless '_d' suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-6-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct fs_device_d to fs_deviceSascha Hauer2023-01-101-4/+4
| | | | | | | | | Remove the meaningless '_d' suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-5-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-101-6/+6
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: ubootvarfs: fix double-free unlinking U-Boot variablesAhmad Fatoum2022-08-221-0/+1
| | | | | | | | | | | | We free the struct ubootvarfs_inode::var as part of destroy_inode. In case we have unlinked the U-Boot variable beforehand, we will end up double-freeing. Set the member to NULL, so it's skipped in destory_inode. We keep the free in destroy_inode, because that's still needed for all the other inodes that aren't unlinked. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220819105521.3848169-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: ubootvarfs: use correct format specifier for pointer diffLucas Stach2019-11-041-1/+1
| | | | | | | | | | | | The difference between two pointers is represented as a ptrdiff_t, use the correct format specifier when printing to get rid of the following warning in a 64bit build: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Add a driver to access U-Boot environment variablesAndrey Smirnov2019-06-071-0/+499
Add a driver working on top of ubootvar device and exposing U-Boot environment variable data as files. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Cory Tusar <cory.tusar@zii.aero> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>