FreeBSD Bugzilla – Attachment 140991 Details for
Bug 187712
config(8) does not respect KERNCONFDIR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.29 KB, created by
Alan Somers
on 2014-03-18 22:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2014-03-18 22:20:00 UTC
Size:
1.29 KB
patch
obsolete
>Index: Makefile.inc1 >=================================================================== >--- Makefile.inc1 (revision 263266) >+++ Makefile.inc1 (working copy) >@@ -1013,7 +1013,7 @@ > @echo ">>> stage 1: configuring the kernel" > @echo "--------------------------------------------------------------" > cd ${KRNLCONFDIR}; \ >- PATH=${TMPPATH} \ >+ PATH=${TMPPATH} KERNCONFDIR=${KERNCONFDIR} \ > config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ > ${KERNCONFDIR}/${_kernel} > .endif >Index: usr.sbin/config/lang.l >=================================================================== >--- usr.sbin/config/lang.l (revision 263266) >+++ usr.sbin/config/lang.l (working copy) >@@ -34,6 +34,7 @@ > #include <assert.h> > #include <ctype.h> > #include <err.h> >+#include <stdlib.h> > #include <string.h> > #include "y.tab.h" > #include "config.h" >@@ -258,6 +259,7 @@ > FILE *fp; > struct incl *in; > char *fnamebuf; >+ char *kernconfdir; > > fnamebuf = NULL; > fp = fopen(fname, "r"); >@@ -269,6 +271,16 @@ > } > } > if (fp == NULL) { >+ kernconfdir = getenv("KERNCONFDIR"); >+ if (kernconfdir != NULL) { >+ asprintf(&fnamebuf, "%s/%s", kernconfdir, fname); >+ if (fnamebuf != NULL) { >+ fp = fopen(fnamebuf, "r"); >+ free(fnamebuf); >+ } >+ } >+ } >+ if (fp == NULL) { > yyerror("cannot open included file"); > return (-1); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 187712
: 140991 |
140992