From 7445683997dde6e39a78cde8303102b5ed4fafd7 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 10 Jun 2016 03:25:22 +0000 Subject: [PATCH] I fookin' forgot! Fookin' prawns --- bin/grab.c | 4 ++-- bin/print.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/grab.c b/bin/grab.c index 46a96fa..fd6149f 100644 --- a/bin/grab.c +++ b/bin/grab.c @@ -30,13 +30,13 @@ int tabby_command_grab(int argc, char **argv) { uint8_t body[TABBY_PRINTER_PACKET_MAX_SIZE]; - if (argc != 2) { + if (argc != 3) { usage(argc, argv, "No device specified"); } if ((printer = tabby_printer_open(argv[1])) == NULL) { fprintf(stderr, "%s: %s: %s: %s\n", argv[0], "tabby_printer_open()", - argv[1], strerror(errno)); + argv[2], strerror(errno)); goto error_printer_open; } diff --git a/bin/print.c b/bin/print.c index 78af7ae..8cc6207 100644 --- a/bin/print.c +++ b/bin/print.c @@ -35,20 +35,20 @@ int tabby_command_print(int argc, char **argv) { uint8_t band[TABBY_PRINTER_BAND_SIZE]; - if (argc != 3) { + if (argc != 4) { usage(argc, argv, "Must specify device and tile"); } - if ((fd = open(argv[2], O_RDONLY)) < 0) { + if ((fd = open(argv[3], O_RDONLY)) < 0) { fprintf(stderr, "%s: %s: %s: %s\n", - argv[0], "open()", argv[2], strerror(errno)); + argv[0], "open()", argv[3], strerror(errno)); goto error_open_tile; } - if ((printer = tabby_printer_open(argv[1])) == NULL) { + if ((printer = tabby_printer_open(argv[2])) == NULL) { fprintf(stderr, "%s: %s: %s: %s\n", - argv[0], "tabby_printer_open()", argv[1], strerror(errno)); + argv[0], "tabby_printer_open()", argv[2], strerror(errno)); goto error_printer_open; }