File: handler_helpers.h

package info (click to toggle)
swupdate 2025.12%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,004 kB
  • sloc: ansic: 66,621; python: 6,291; makefile: 791; sh: 538; javascript: 229
file content (32 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * (C) Copyright 2022
 * Stefano Babic <stefano.babic@swupdate.org>
 *
 * SPDX-License-Identifier:     GPL-2.0-only
 */

#pragma once

#include "swupdate_image.h"
struct chain_handler_data {
	struct img_type img;
};

#define FIFO_THREAD_READ	0
#define FIFO_HND_WRITE		1

struct hnd_load_priv {
	int fifo[2];	/* PIPE where to write */
	size_t	totalbytes;
	int exit_status;
};

struct bgtask_handle {
	const char *cmd;
	char *parms;
	struct img_type *img;
};

void *chain_handler_thread(void *data);
extern int handler_transfer_data(void *data, const void *buf, size_t len);
int bgtask_handler(struct bgtask_handle *bg);