mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
client: add debug logging of argc/argv
This commit is contained in:
parent
19c099236b
commit
570b3ac25a
1 changed files with 4 additions and 0 deletions
4
client.c
4
client.c
|
|
@ -13,6 +13,7 @@
|
||||||
#include <linux/un.h>
|
#include <linux/un.h>
|
||||||
|
|
||||||
#define LOG_MODULE "foot-client"
|
#define LOG_MODULE "foot-client"
|
||||||
|
#define LOG_ENABLE_DBG 0
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
@ -114,6 +115,7 @@ main(int argc, char *const *argv)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG_DBG("argc = %d", argc);
|
||||||
if (send(fd, &argc, sizeof(argc), 0) != sizeof(argc)) {
|
if (send(fd, &argc, sizeof(argc), 0) != sizeof(argc)) {
|
||||||
LOG_ERRNO("failed to send argc/argv to server");
|
LOG_ERRNO("failed to send argc/argv to server");
|
||||||
goto err;
|
goto err;
|
||||||
|
|
@ -122,6 +124,8 @@ main(int argc, char *const *argv)
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
uint16_t len = strlen(argv[i]);
|
uint16_t len = strlen(argv[i]);
|
||||||
|
|
||||||
|
LOG_DBG("argv[%d] = %s (%hu)", i, argv[i], len);
|
||||||
|
|
||||||
if (send(fd, &len, sizeof(len), 0) != sizeof(len) ||
|
if (send(fd, &len, sizeof(len), 0) != sizeof(len) ||
|
||||||
send(fd, argv[i], len, 0) != sizeof(len))
|
send(fd, argv[i], len, 0) != sizeof(len))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue