summaryrefslogtreecommitdiffstats
path: root/common/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/misc.c')
-rw-r--r--common/misc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/misc.c b/common/misc.c
index c5d3704c82..0888f1f4f6 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -187,6 +187,13 @@ const char *barebox_get_hostname(void)
}
EXPORT_SYMBOL(barebox_get_hostname);
+void barebox_set_hostname_no_overwrite(const char *__hostname)
+{
+ if (!barebox_get_hostname())
+ barebox_set_hostname(__hostname);
+}
+EXPORT_SYMBOL(barebox_set_hostname_no_overwrite);
+
BAREBOX_MAGICVAR_NAMED(global_hostname, global.hostname,
"shortname of the board. Also used as hostname for DHCP requests");