Re: [PATCH 1/3] do collectcfiles work in perl itself, eschew shell pipeline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 21, 2011 1:21 am, Jim Cromie wrote:

>  sub collectcfiles {
> -    my @file
> -	= `cat .tmp_versions/*.mod | grep '.*\.ko\$' | sed s/\.ko$/.mod.c/`;
> +    my @file;
> +    while (<.tmp_versions/*.mod>) {
> +	open my $fh, '<', $_ or die "cant open $_: $!\n";

Use either "can't" or "cannot".  "cant" is a different word.

> +	push (@file,
> +	      grep s/\.ko/.mod.c/,	# change the suffix
> +	      grep m/.+\.ko/,		# find the .ko path
> +	      <$fh>);			# lines in opened file
> +    }
>      chomp @file;
>      return @file;
>  }


-- 
~Randy

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux