added short cmd, not tested

This commit is contained in:
2025-02-11 22:42:32 +03:00
parent d7df8e5bf1
commit aefeb50aab
13 changed files with 435 additions and 75 deletions

View File

@@ -227,7 +227,8 @@ static void *mountthread(void _U_ *u){
// data to get
data_t d = {.buf = buf, .maxlen = sizeof(buf)};
// cmd to send
const data_t *cmd_getstat = cmd2dat(CMD_GETSTAT);
data_t *cmd_getstat = cmd2dat(CMD_GETSTAT);
if(!cmd_getstat) goto failed;
double t0 = dtime();
/*
#ifdef EBUG
@@ -256,6 +257,8 @@ static void *mountthread(void _U_ *u){
while(dtime() - t0 < Conf.MountReqInterval);
t0 = dtime();
}
data_free(&cmd_getstat);
failed:
if(mntfd > -1){
close(mntfd);
mntfd = -1;