Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2018 05:21:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 231441] 12.0-ALPHA6 network does not start at boot
Message-ID:  <bug-231441-7501-r2J4t2cVId@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-231441-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-231441-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231441

--- Comment #13 from Warner Losh <imp@FreeBSD.org> ---
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index e81f718159b1..b2d08324511f 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -666,7 +666,7 @@ config::shell_quote(const string &s)
 }

 void
-config::expand_one(const char *&src, string &dst)
+config::expand_one(const char *&src, string &dst, bool is_shell)
 {
        int count;
        string buffer;
@@ -705,7 +705,7 @@ config::expand_one(const char *&src, string &dst)
        do {
                buffer +=3D *src++;
        } while (is_id_char(*src));
-       dst.append(shell_quote(get_variable(buffer)));
+       dst.append(is_shell ? shell_quote(get_variable(buffer)) :
get_variable(buffer));
 }

 const string
@@ -731,7 +731,7 @@ config::expand_string(const char *src, const char *prep=
end,
const char *append)
                }
                dst.append(src, var_at - src);
                src =3D var_at;
-               expand_one(src, dst);
+               expand_one(src, dst, prepend =3D=3D NULL);
        }

        if (append !=3D NULL)
diff --git a/sbin/devd/devd.hh b/sbin/devd/devd.hh
index 534c4d4c5a9d..d770da22226a 100644
--- a/sbin/devd/devd.hh
+++ b/sbin/devd/devd.hh
@@ -172,7 +172,7 @@ protected:
        void sort_vector(std::vector<event_proc *> &);
        void parse_one_file(const char *fn);
        void parse_files_in_dir(const char *dirname);
-       void expand_one(const char *&src, std::string &dst);
+       void expand_one(const char *&src, std::string &dst, bool is_shell);
        std::string shell_quote(const std::string &s);
        bool is_id_char(char) const;
        bool chop_var(char *&buffer, char *&lhs, char *&rhs) const;

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231441-7501-r2J4t2cVId>