Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jan 2005 16:34:20 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Max Laier <max@love2party.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: We have a lot of duplicated code in the kernel
Message-ID:  <20050130163420.1574603b@Magellan.Leidinger.net>
In-Reply-To: <200501291827.27506.max@love2party.net>
References:  <20050129161022.0de822fe@Magellan.Leidinger.net> <200501291827.27506.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 29 Jan 2005 18:27:17 +0100
Max Laier <max@love2party.net> wrote:

> Could you regenerate the list w/o the MD code, as a first step?  This might 
> turn up a couple of "easy to fix" cases of shared code.

Following is how I filter out the unwanted parts. Any ideas how to
filter out the MD parts without losing the possibility to determine
duplicated code for a specific architecture? Simian itself doesn't
offers a good exclude feature.

---snip---
        awk <"${log}.bak" '
                BEGIN {
                        found=0
                        last=""
                }

                {
                        if(0 != match($0, "(twa_fwimg|trlld.m|if_patm_rtables)")) {
                                next;
                        }

                        if(0 != index($0, "Found")) {
                                found = 1;
                                last = $0;
                        } else if(0 != index($0, "Processed")) {
                                found = 0;
                                print $0;
                        } else {
                                if(1 == found) {
                                        found = 0;
                                        print last;
                                }
                                print $0;
                        }
                }' >"${log}"
---snip---

ATM I just can suggest to read over the MD parts.

Bye,
Alexander.

-- 
                Where do you think you're going today?

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050130163420.1574603b>