[PATCH] dtc: Implement -d option to write out a dependency file

David Gibson david at gibson.dropbear.id.au
Tue Jan 10 10:33:13 EST 2012


On Mon, Jan 09, 2012 at 01:33:29PM -0700, Stephen Warren wrote:
> This will allow callers to rebuild .dtb files when any of the /include/d
> .dtsi files are modified, not just the top-level .dts file.
> 
> Signed-off-by: Stephen Warren <swarren at nvidia.com>

[snip]
> +	if (depname) {
> +		depfile = fopen(depname, "w");
> +		if (!depfile)
> +			die("Couldn't open dependency file %s: %s\n", depname,
> +			    strerror(errno));
> +		fputs(outname, depfile);
> +		fputc(':', depfile);

Please just use fprintf, instead of all this jiggery pokery with fputs
and fputc.  It's much clearer and the performance difference is
meanningless.

Otherwise, nice patch.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson


More information about the devicetree-discuss mailing list