I fookin' forgot! Fookin' prawns

This commit is contained in:
XANTRONIX Development 2016-06-10 03:25:22 +00:00
parent 6ba12e1f38
commit 7445683997
2 changed files with 7 additions and 7 deletions

View file

@ -30,13 +30,13 @@ int tabby_command_grab(int argc, char **argv) {
uint8_t body[TABBY_PRINTER_PACKET_MAX_SIZE]; uint8_t body[TABBY_PRINTER_PACKET_MAX_SIZE];
if (argc != 2) { if (argc != 3) {
usage(argc, argv, "No device specified"); usage(argc, argv, "No device specified");
} }
if ((printer = tabby_printer_open(argv[1])) == NULL) { if ((printer = tabby_printer_open(argv[1])) == NULL) {
fprintf(stderr, "%s: %s: %s: %s\n", argv[0], "tabby_printer_open()", fprintf(stderr, "%s: %s: %s: %s\n", argv[0], "tabby_printer_open()",
argv[1], strerror(errno)); argv[2], strerror(errno));
goto error_printer_open; goto error_printer_open;
} }

View file

@ -35,20 +35,20 @@ int tabby_command_print(int argc, char **argv) {
uint8_t band[TABBY_PRINTER_BAND_SIZE]; uint8_t band[TABBY_PRINTER_BAND_SIZE];
if (argc != 3) { if (argc != 4) {
usage(argc, argv, "Must specify device and tile"); 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", 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; 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", 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; goto error_printer_open;
} }