From owner-p4-projects@FreeBSD.ORG Tue Feb 26 22:45:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 33CF21065672; Tue, 26 Feb 2008 22:45:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA364106566C for ; Tue, 26 Feb 2008 22:45:54 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D600C13C45B for ; Tue, 26 Feb 2008 22:45:54 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1QMjssj099447 for ; Tue, 26 Feb 2008 22:45:54 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1QMjs2S099444 for perforce@freebsd.org; Tue, 26 Feb 2008 22:45:54 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 26 Feb 2008 22:45:54 GMT Message-Id: <200802262245.m1QMjs2S099444@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 136296 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2008 22:45:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=136296 Change 136296 by kmacy@kmacy:entropy:iwarp on 2008/02/26 22:45:30 parameterize slightly better to allow creation of multiple of blob headers Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/bin2h.pl#2 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/bin2h.pl#2 (text+ko) ==== @@ -12,7 +12,7 @@ print "failed to open input\n"; exit 1; } -$success = open OUTPUT, ">$ARGV[1]"; +$success = open OUTPUT, ">$ARGV[1].h"; unless ($success) { print "failed to open output\n"; exit 1; @@ -64,13 +64,13 @@ print OUTPUT "#define U (unsigned char)\n\n"; -print OUTPUT "static unsigned int t3fw_length = $size;\n"; -print OUTPUT "static unsigned char t3fw[$size] = {\n"; +print OUTPUT "static unsigned int $ARGV[1]_length = $size;\n"; +print OUTPUT "static unsigned char $ARGV[1]" . "[$size]" . " = {\n"; for (my $i = 0; $i < $size; $i += 4) { my $number_read = read(INPUT, $binary, 4); my ($a, $b, $c, $d) = unpack("C C C C", $binary); - $buf = sprintf("U 0x%02X, U 0x%02X, U 0x%02X, U 0x%02X, \n", $a, $b, $c, $d); + $buf = sprintf("\tU 0x%02X, U 0x%02X, U 0x%02X, U 0x%02X, \n", $a, $b, $c, $d); print OUTPUT $buf; } print OUTPUT "};\n";