summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWeijie Gao <[email protected]>2026-05-20 16:27:28 +0800
committerHeiko Schocher <[email protected]>2026-07-08 11:29:28 +0200
commit065b0ba3b14fd6795626b89d5e8e3daede02475a (patch)
treefd94232b035924a6fdf4e5a3b404289ee27020a4 /include
parenta7d690cf3a7bdc1a56b72094f33a44042b898cfc (diff)
cmd: ubi: mark read-only function parameters with const
Parameters like part/volume name and buffer for writing are not being modified by the callee functions and should be marked const. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/ubi_uboot.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
index 05fb9634d81..a949d1b80dd 100644
--- a/include/ubi_uboot.h
+++ b/include/ubi_uboot.h
@@ -47,9 +47,10 @@
int ubi_mtd_param_parse(const char *val, struct kernel_param *kp);
int ubi_init(void);
void ubi_exit(void);
-int ubi_part(char *part_name, const char *vid_header_offset);
-int ubi_volume_write(char *volume, void *buf, loff_t offset, size_t size);
-int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size);
+int ubi_part(const char *part_name, const char *vid_header_offset);
+int ubi_volume_write(const char *volume, const void *buf, loff_t offset,
+ size_t size);
+int ubi_volume_read(const char *volume, char *buf, loff_t offset, size_t size);
extern struct ubi_device *ubi_devices[];
int cmd_ubifs_mount(char *vol_name);