unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob a5e01289471321057afb12c4f192bfbba0349dfc 1114 bytes (raw)
name: gnu/packages/patches/teensy-loader-cli-Add-support-for-h-help.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
Add support for `-h` (help).
This option was already in the usage message, but not implemented.

Upstream pull-request pending.

---
 teensy_loader_cli.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/teensy_loader_cli.c b/teensy_loader_cli.c
index d4a6cc5..0a06209 100644
--- a/teensy_loader_cli.c
+++ b/teensy_loader_cli.c
@@ -37,7 +37,8 @@ void usage(const char *err)
 {
 	if(err != NULL) fprintf(stderr, "%s\n\n", err);
 	fprintf(stderr,
-		"Usage: teensy_loader_cli --mcu=<MCU> [-w] [-h] [-n] [-b] [-v] <file.hex>\n"
+		"Usage: teensy_loader_cli --mcu=<MCU> [-h] [-w] [-n] [-b] [-v] <file.hex>\n"
+		"\t-h : Print this help message\n"
 		"\t-w : Wait for device to appear\n"
 		"\t-r : Use hard reboot if device not online\n"
 		"\t-s : Use soft reboot if device not online (Teensy3.x only)\n"
@@ -1081,6 +1082,7 @@ void parse_flag(char *arg)
 	int i;
 	for(i=1; arg[i]; i++) {
 		switch(arg[i]) {
+			case 'h': usage(NULL); break;
 			case 'w': wait_for_device_to_appear = 1; break;
 			case 'r': hard_reboot_device = 1; break;
 			case 's': soft_reboot_device = 1; break;
-- 
2.7.4


debug log:

solving a5e0128 ...
found a5e0128 in https://yhetil.org/guix-devel/1465938855-15618-2-git-send-email-h.goebel@crazy-compilers.com/ ||
	https://yhetil.org/guix-devel/1465903146-7061-1-git-send-email-h.goebel@crazy-compilers.com/

applying [1/1] https://yhetil.org/guix-devel/1465938855-15618-2-git-send-email-h.goebel@crazy-compilers.com/
diff --git a/gnu/packages/patches/teensy-loader-cli-Add-support-for-h-help.patch b/gnu/packages/patches/teensy-loader-cli-Add-support-for-h-help.patch
new file mode 100644
index 0000000..a5e0128

1:22: space before tab in indent.
 	if(err != NULL) fprintf(stderr, "%s\n\n", err);
1:23: space before tab in indent.
 	fprintf(stderr,
1:27: space before tab in indent.
 		"\t-w : Wait for device to appear\n"
1:28: space before tab in indent.
 		"\t-r : Use hard reboot if device not online\n"
1:29: space before tab in indent.
 		"\t-s : Use soft reboot if device not online (Teensy3.x only)\n"
Checking patch gnu/packages/patches/teensy-loader-cli-Add-support-for-h-help.patch...
Applied patch gnu/packages/patches/teensy-loader-cli-Add-support-for-h-help.patch cleanly.
warning: squelched 8 whitespace errors
warning: 13 lines add whitespace errors.

skipping https://yhetil.org/guix-devel/1465903146-7061-1-git-send-email-h.goebel@crazy-compilers.com/ for a5e0128
index at:
100644 a5e01289471321057afb12c4f192bfbba0349dfc	gnu/packages/patches/teensy-loader-cli-Add-support-for-h-help.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).