[PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff

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

 




From: Frank Rowand <frank.rowand@xxxxxxxxxxx>

Do not require dtx_diff to be in $PATH.

dt_to_config already needs to be run from the root directory of a kernel
tree so use scripts/dtc/dtx_diff instead of dtx_diff.

Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxxxxx>
---
 scripts/dtc/dt_to_config |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Index: b/scripts/dtc/dt_to_config
===================================================================
--- a/scripts/dtc/dt_to_config
+++ b/scripts/dtc/dt_to_config
@@ -871,19 +871,10 @@ sub read_dts()
 		exit 3;
 	}
 
-	if (! `which dtx_diff`) {
-		print STDERR "\n";
-		print STDERR "file 'dtx_diff' is not executable or does not exist\n";
-		print STDERR "   Is scripts/dtc/ in the shell \$PATH variable?\n";
-		print STDERR "   Are you in the root directory of a kernel tree?\n";
-		print STDERR "\n";
-		exit 3;
-	}
-
-	if (!open(DT_FILE, "-|", "dtx_diff $file")) {
+	if (!open(DT_FILE, "-|", "$dtx_diff $file")) {
 		print STDERR "\n";
 		print STDERR "shell command failed:\n";
-		print STDERR "   dtx_diff $file\n";
+		print STDERR "   $dtx_diff $file\n";
 		print STDERR "\n";
 		exit 3;
 	}
@@ -1207,6 +1198,15 @@ if ($white_list_config) {
 	}
 }
 
+if (-x "scripts/dtc/dtx_diff") {
+	$dtx_diff = "scripts/dtc/dtx_diff";
+} else {
+
+	print STDERR "\n";
+	print STDERR "$script_name must be run from the root directory of a Linux kernel tree\n";
+	print STDERR "\n";
+	exit 3;
+}
 
 for $file (@ARGV) {
 	&read_dts($file);
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux