public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
1f0747c7e0e61f868c1d09412f024f0080505b92 blob 721 bytes (raw)

 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
 
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright Red Hat
 * Author: David Gibson <david@gibson.dropbear.id.au>
 */

#ifndef SERIALISE_H
#define SERIALISE_H

#include <stddef.h>
#include <stdint.h>

int seread_buf(int fd, void *buf, size_t len);
int sewrite_buf(int fd, const void *buf, size_t len);

#define seread_var(fd_, var_)	(seread_buf((fd_), (var_), sizeof(*(var_))))
#define sewrite_var(fd_, var_)	(sewrite_buf((fd_), (var_), sizeof(*(var_))))

#define SERIALISE_UINT_DECL(bits)					\
	int seread_u##bits(int fd, uint##bits##_t *val);		\
	int sewrite_u##bits(int fd, uint##bits##_t val);

SERIALISE_UINT_DECL(8)
SERIALISE_UINT_DECL(32)

int sewrite_str(int fd, const char *s);

#endif /* _SERIALISE_H */
debug log:

solving 1f0747c7 ...
found 1f0747c7 in https://archives.passt.top/passt-dev/20260319061157.1983818-10-david@gibson.dropbear.id.au/
found f2e0aa8d in https://archives.passt.top/passt-dev/20260319061157.1983818-4-david@gibson.dropbear.id.au/
found ec95287f in https://archives.passt.top/passt-dev/20260319061157.1983818-3-david@gibson.dropbear.id.au/

applying [1/3] https://archives.passt.top/passt-dev/20260319061157.1983818-3-david@gibson.dropbear.id.au/
diff --git a/serialise.h b/serialise.h
new file mode 100644
index 00000000..ec95287f


applying [2/3] https://archives.passt.top/passt-dev/20260319061157.1983818-4-david@gibson.dropbear.id.au/
diff --git a/serialise.h b/serialise.h
index ec95287f..f2e0aa8d 100644


applying [3/3] https://archives.passt.top/passt-dev/20260319061157.1983818-10-david@gibson.dropbear.id.au/
diff --git a/serialise.h b/serialise.h
index f2e0aa8d..1f0747c7 100644

Checking patch serialise.h...
Applied patch serialise.h cleanly.
Checking patch serialise.h...
Applied patch serialise.h cleanly.
Checking patch serialise.h...
Applied patch serialise.h cleanly.

index at:
100644 1f0747c7e0e61f868c1d09412f024f0080505b92	serialise.h

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).