Re: We have a lot of duplicated code in the kernel

From: Alexander Leidinger <Alexander_at_Leidinger.net>
Date: Sun, 30 Jan 2005 16:34:20 +0100
On Sat, 29 Jan 2005 18:27:17 +0100
Max Laier <max_at_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 _at_ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7
Received on Sun Jan 30 2005 - 14:34:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:27 UTC