Fix argument check in main function and update usage message; modify addPersonToList return values; add file_operations header

This commit is contained in:
2025-04-22 20:56:42 +02:00
parent 58e02ad54c
commit 53867532c0
4 changed files with 12 additions and 6 deletions
+4 -4
View File
@@ -11,12 +11,13 @@
#include "users.h"
#include "tui.h"
#include "rfid_handler.h"
#include "file_operations.h"
int main(int argc, char const **argv)
{
if (argc != 1)
if (argc != 2)
{
printf("Usage: %s <Address of RFID reader>\n", argv[0]);
printf("filename argument required\nUsage: %s [User database]\n", argv[0]);
return EXIT_FAILURE;
}
@@ -45,8 +46,7 @@ int main(int argc, char const **argv)
erase();
refresh();
// uartDialog(uart_address, x_max, y_max);
strcpy(uart_address, argv[1]);
uartDialog(uart_address, x_max, y_max);
pthread_create(&uart_thread, NULL, uartListener, uart_address);