From a4e6da691f4819fee4fe1f012d6b51771e0b3ebc Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Fri, 13 Apr 2001 09:37:25 +0000 Subject: [PATCH] Generate useful error messages. --- sys/kern/gensetdefs.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/gensetdefs.pl b/sys/kern/gensetdefs.pl index 1502bdcb185c..ec81d37973dd 100644 --- a/sys/kern/gensetdefs.pl +++ b/sys/kern/gensetdefs.pl @@ -39,7 +39,7 @@ my $objdump = $ENV{'OBJDUMP'} || 'objdump'; # Run objdump over each object file to find all defined linker sets. # Linker sets are sections with names starting with `.set.' foreach my $objfile (@ARGV) { - open(SECTION, "$objdump -h $objfile |") or die; + open(SECTION, "$objdump -h $objfile |") or die "objdump -h $objfile failed : $!"; while (
) { my ($index, $name, $size, $vma, $lma, $offset, $align) = split; @@ -68,12 +68,12 @@ while (my ($name, $size) = each %sets) { } # Create setdefs.h -open(SETDEFS_H, "> setdefs.h") or die; +open(SETDEFS_H, "> setdefs.h") or die "Could not write to setdefs.h : $!"; print SETDEFS_H sort @setdefs; close SETDEFS_H; # Create setdef0.c -open(SETDEF0_C, "> setdef0.c") or die; +open(SETDEF0_C, "> setdef0.c") or die "Could not write to setdef0.c : $!"; print SETDEF0_C < setdef1.c") or die; +open(SETDEF1_C, "> setdef1.c") or die "Could not write to setdef1.c : $!"; print SETDEF1_C <