File: diskbuf.h

package info (click to toggle)
erofs-utils 1.8.10-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,128 kB
  • sloc: ansic: 20,839; makefile: 164; sh: 33
file content (30 lines) | stat: -rw-r--r-- 639 bytes parent folder | download | duplicates (2)
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
/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
#ifndef __EROFS_DISKBUF_H
#define __EROFS_DISKBUF_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "erofs/defs.h"

struct erofs_diskbuf {
	void *sp;		/* internal stream pointer */
	u64 offset;		/* internal offset */
};

int erofs_diskbuf_getfd(struct erofs_diskbuf *db, u64 *off);

int erofs_diskbuf_reserve(struct erofs_diskbuf *db, int sid, u64 *off);
void erofs_diskbuf_commit(struct erofs_diskbuf *db, u64 len);
void erofs_diskbuf_close(struct erofs_diskbuf *db);

int erofs_diskbuf_init(unsigned int nstrms);
void erofs_diskbuf_exit(void);

#ifdef __cplusplus
}
#endif

#endif