]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Do not print .lua extension twice
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 29 Mar 2022 09:11:57 +0000 (12:11 +0300)
committermergify-bot <noreply@mergify.com>
Wed, 30 Mar 2022 11:56:00 +0000 (11:56 +0000)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 93b2d38aedcf6d42e63d50b353927134a832e57a)

lib/frrscript.c

index 4fee79991aa6435efff102946d3e4ccaf1d4915c..8add44c19e5fec9fb8f6c24d053c20bc9c233b14 100644 (file)
@@ -373,7 +373,7 @@ int frrscript_load(struct frrscript *fs, const char *function_name,
        }
 
        if (luaL_dofile(L, script_name) != 0) {
-               zlog_err("frrscript: failed loading script '%s.lua': error: %s",
+               zlog_err("frrscript: failed loading script '%s': error: %s",
                         script_name, lua_tostring(L, -1));
                goto fail;
        }
@@ -381,7 +381,7 @@ int frrscript_load(struct frrscript *fs, const char *function_name,
        /* To check the Lua function, we get it from the global table */
        lua_getglobal(L, function_name);
        if (lua_isfunction(L, lua_gettop(L)) == 0) {
-               zlog_err("frrscript: loaded script '%s.lua' but %s not found",
+               zlog_err("frrscript: loaded script '%s' but %s not found",
                         script_name, function_name);
                goto fail;
        }
@@ -391,7 +391,7 @@ int frrscript_load(struct frrscript *fs, const char *function_name,
 
        if (load_cb && (*load_cb)(fs) != 0) {
                zlog_err(
-                       "frrscript: '%s.lua': %s: loaded but callback returned non-zero exit code",
+                       "frrscript: '%s': %s: loaded but callback returned non-zero exit code",
                        script_name, function_name);
                goto fail;
        }