aboutsummaryrefslogtreecommitdiff
path: root/include/io/xattr.h
blob: d9f3e65d7f8da1cdda24f4eb609f6dd50cd5c998 (plain)
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
33
34
35
/* SPDX-License-Identifier: GPL-3.0-or-later */
/*
 * xattr.h
 *
 * Copyright (C) 2023 David Oberhollenzer <goliath@infraroot.at>
 */
#ifndef IO_XATTR_H
#define IO_XATTR_H

#include "sqfs/predef.h"

typedef struct dir_entry_xattr_t {
	struct dir_entry_xattr_t *next;
	char *key;
	sqfs_u8 *value;
	size_t value_len;
	char data[];
} dir_entry_xattr_t;

#ifdef __cplusplus
extern "C" {
#endif

dir_entry_xattr_t *dir_entry_xattr_create(const char *key, const sqfs_u8 *value,
					  size_t value_len);

dir_entry_xattr_t *dir_entry_xattr_list_copy(const dir_entry_xattr_t *list);

void dir_entry_xattr_list_free(dir_entry_xattr_t *list);

#ifdef __cplusplus
}
#endif

#endif /* IO_XATTR_H */