Skip to contentSkip to conversation

topology: delete output file if parsing fails.

PATCH Applied Liam Girdwood 2 participants 3 messages Jun 9, 2017 – Jun 12, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 topology: delete output file if parsing fails.

Currently the binary output file is left when parsing fails. This confuses GNU Make if the parsing fails and causes the compilation to partially complete.

---
 topology/topology.c | 1 +
 1 file changed, 1 insertion(+)
topology/topology.c +1 -0
index 6d876ee..097c255 100644
@@ -108,6 +108,7 @@ int main(int argc, char *argv[])
 	if (err < 0) {
 		fprintf(stderr, _("failed to compile context %s\n"), source_file);
 		snd_tplg_free(snd_tplg);
+		unlink(output_file);
 		return 1;
 	}
 
Signature · 1 line
2.11.0
Applied
#1 lore raw
Quoted 6 lines · Liam Girdwood

Currently the binary output file is left when parsing fails. This confuses GNU Make if the parsing fails and causes the compilation to partially complete.

Applied, thanks.

But at the next time, please specify which repo to apply. It took some time until I figured out it's for alsa-utils.

Takashi

Quoted 24 lines
---
 topology/topology.c | 1 +
 1 file changed, 1 insertion(+)
topology/topology.c +1 -0
index 6d876ee..097c255 100644
@@ -108,6 +108,7 @@ int main(int argc, char *argv[])
 	if (err < 0) {
 		fprintf(stderr, _("failed to compile context %s\n"), source_file);
 		snd_tplg_free(snd_tplg);
+		unlink(output_file);
 		return 1;
 	}
 
Signature · 6 lines
2.11.0

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#2 lore raw
Quoted 7 lines · Takashi Iwai
Quoted 5 lines · Liam Girdwood

Currently the binary output file is left when parsing fails. This confuses GNU Make if the parsing fails and causes the compilation to partially complete.

Quoted 6 lines
Quoted 1 line

Applied, thanks.

But at the next time, please specify which repo to apply. It took some time until I figured out it's for alsa-utils.

Apologies, I was doing some alsa-lib patches at the same time. This did make me realize we do have some other similar named areas that overlap in the kernel and in alsa-lib, but they are probably manageable for the moment.

Thanks

Liam