aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/platform/mikrotik/routerboot.h
diff options
context:
space:
mode:
authorThibaut VARÈNE <hacks@slashdirt.org>2020-05-13 22:12:41 +0200
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2020-05-28 11:09:10 +0200
commitf36e710e2d6da4c4a15a2af94204236d8fcae988 (patch)
tree89ef2a7f4524c2830689472d7df31dc674a7beae /target/linux/generic/files/drivers/platform/mikrotik/routerboot.h
parentdac18f66fb18ebadf6f050d9c5c055a82855e8f6 (diff)
downloadupstream-f36e710e2d6da4c4a15a2af94204236d8fcae988.tar.gz
upstream-f36e710e2d6da4c4a15a2af94204236d8fcae988.tar.bz2
upstream-f36e710e2d6da4c4a15a2af94204236d8fcae988.zip
generic: routerboot sysfs: add support for soft_config
This driver exposes the data encoded in the "soft_config" flash segment of MikroTik RouterBOARDs devices. It presents the data in a sysfs folder named "soft_config" through a set of human-and-machine-parseable attributes. Changes can be discarded by writing 0 to the 'commit' attribute, or they can be committed to flash storage by writing 1. This driver does not reuse any of the existing code previously found in the "rbcfg" utility and makes this utility obsolete by providing a clean sysfs interface. Like "rbcfg", this driver requires 4K_SECTORS support since the flash partition in which these parameters are stored is typically 4KB in size. Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Diffstat (limited to 'target/linux/generic/files/drivers/platform/mikrotik/routerboot.h')
-rw-r--r--target/linux/generic/files/drivers/platform/mikrotik/routerboot.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/platform/mikrotik/routerboot.h b/target/linux/generic/files/drivers/platform/mikrotik/routerboot.h
index e1ae972183..5b644db4fe 100644
--- a/target/linux/generic/files/drivers/platform/mikrotik/routerboot.h
+++ b/target/linux/generic/files/drivers/platform/mikrotik/routerboot.h
@@ -28,6 +28,9 @@ int routerboot_rle_decode(const u8 *in, size_t inlen, u8 *out, size_t *outlen);
int __init rb_hardconfig_init(struct kobject *rb_kobj);
void __exit rb_hardconfig_exit(void);
+int __init rb_softconfig_init(struct kobject *rb_kobj);
+void __exit rb_softconfig_exit(void);
+
ssize_t routerboot_tag_show_string(const u8 *pld, u16 pld_len, char *buf);
#endif /* _ROUTERBOOT_H_ */