Re: sys/conf/DEFAULT[S]

From: Adam Migus (adam_at_migus.org)
Date: 09/27/03

  • Next message: Stefan Farfeleder: "Re: sys/conf/DEFAULT[S]"
    Date: Sat, 27 Sep 2003 14:49:53 -0400
    To: Stefan Farfeleder <stefan@fafoe.narf.at>
    
    

    Stefan Farfeleder wrote:

    >On Sat, Sep 27, 2003 at 08:14:30AM +1000, Bruce Evans wrote:
    >
    >
    >
    >>Similarly with FOOBAR's contents identical with SMP's contents except
    >>for including FOO instead of GENERIC. So the bug must be related to
    >>the file being included ... adding an empty or comment line to the
    >>beginning of FOO works around it. I guess there is an off-by-1 byte
    >>or line error switching the input stream.
    >>
    >>
    >
    >The problem is simply that the input stream is switched immediately to
    >the included file after reading the file name and the parser is still
    >waiting for its newline or semicolon from the production
    >
    >Spec -> Config_spec SEMICOLON.
    >
    >Thus the terminal 'machine' on the first line is a syntax error.
    >
    >Stefan
    >
    >
    >------------------------------------------------------------------------
    >
    >Index: src/usr.sbin/config/config.y
    >===================================================================
    >RCS file: /usr/home/ncvs/src/usr.sbin/config/config.y,v
    >retrieving revision 1.61
    >diff -u -r1.61 config.y
    >--- src/usr.sbin/config/config.y 6 Jul 2003 02:00:52 -0000 1.61
    >+++ src/usr.sbin/config/config.y 27 Sep 2003 10:39:13 -0000
    >@@ -118,6 +118,9 @@
    > |
    > Config_spec SEMICOLON
    > |
    >+ INCLUDE ID SEMICOLON
    >+ = { include($2, 0); };
    >+ |
    > SEMICOLON
    > |
    > error SEMICOLON
    >@@ -164,9 +167,7 @@
    > = {
    > hints = $2;
    > hintmode = 1;
    >- } |
    >- INCLUDE ID
    >- = { include($2, 0); };
    >+ }
    >
    > System_spec:
    > CONFIG System_id System_parameter_list
    >
    >
    >------------------------------------------------------------------------
    >
    Actually, while the error is not simply an "off-by-one" error, this
    patch is not sufficient to fix the nested case:

    Below is the output of running config (with or without this patch) on my
    set of kernels, one of which includes twice on the first line. This
    language specification, in fact, fails to handle an include, immediately
    followed by anything other than a blank line or comment. Thus the fix
    is a little more complicated.

    root@caster:ttyp1:conf# for _i in D* F* MAC* SMP*; do echo -n "${_i}:";
    grep -n ^include "${_i}"; [ `grep -c ^include "${_i}"` -lt 1 ] && echo;
    /tmp/config "${_i}" >/dev/null 2>&1; [ $? -ne 0 ] && echo "error"; done
    DISKLESS:1:include GENERIC
    DISKLESS_FAST:1:include FAST
    DISKLESS_FAST_ULE:1:include FAST_ULE
    DISKLESS_MAC:2:include MAC
    DISKLESS_MAC_ULE:2:include MAC_ULE
    DISKLESS_SMP:3:include SMP
    DISKLESS_SMP_FAST:3:include SMP_FAST
    DISKLESS_SMP_FAST_ULE:3:include SMP_FAST_ULE
    DISKLESS_SMP_MAC:1:include SMP_MAC
    error
    DISKLESS_SMP_MAC_ULE:3:include SMP_MAC_ULE
    FAST:
    FAST_ULE:
    MAC:
    MAC_ULE:
    SMP:6:include GENERIC
    SMP_FAST:6:include FAST
    SMP_FAST_ULE:6:include FAST_ULE
    SMP_MAC:1:include MAC
    SMP_MAC_ULE:2:include MAC_ULE
    root@caster:ttyp1:conf#

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Stefan Farfeleder: "Re: sys/conf/DEFAULT[S]"

    Relevant Pages

    • Re: [Bug #13111] Linux 2.6.30-rc1 tg3 endian issues with MAC addresses on BCM5701
      ... We're half-way to a fix for this, see the commit below. ... reported that the test patch I sent out worked for them. ... We noticed on parisc that our broadcoms all swapped MAC addresses going ...
      (Linux-Kernel)
    • Re: OT- Mac Developers Conference
      ... I still haven't figured out how to get newsgroups on my Mac. ... wouldn't know how to troubleshoot the operating system now to save my ... It does seem to be a system of adding patch upon patch upon ... fix upon fix. ...
      (rec.arts.tv.soaps.cbs)
    • Linux 2.6.19
      ... knowing that it's all your own d*mn fault, and you should just fix your ... [SCSI] ... [PATCH] ... USB: ipaq: Add HTC Modem Support ...
      (Linux-Kernel)
    • Re: Linux 2.6.19
      ... knowing that it's all your own d*mn fault, and you should just fix your ... [SCSI] ... [PATCH] ... USB: ipaq: Add HTC Modem Support ...
      (Linux-Kernel)
    • Re: problem with 200GB hard drive
      ... > the partition and then run mkfs.ext3 and format the partition, ... - add patch from Dave Jones ... - fix error message, do block size checking on s390 only ... - automated rebuild ...
      (Fedora)