17 #define RzIOSPARSE_FD(x) (((RzIOSparse *)(x)->data)->fd)
18 #define RzIOSPARSE_BUF(x) (((RzIOSparse *)(x)->data)->buf)
19 #define RzIOSPARSE_OFF(x) (((RzIOSparse *)(x)->data)->offset)
24 if (!
fd || !
fd->data) {
39 if (!
fd || !
fd->data) {
53 if (!
fd || !
fd->data) {
76 return (!strncmp(
pathname,
"sparse://", 9));
91 eprintf(
"Cannot allocate (%s) %d byte(s)\n",
112 .desc =
"Sparse buffer allocation plugin",
124 #ifndef RZ_PLUGIN_INCORE
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
RZ_API void Ht_() free(HtName_(Ht) *ht)
static bool __plugin_open(struct rz_io_t *io, const char *pathname, bool many)
static int __read(RzIO *io, RzIODesc *fd, ut8 *buf, int count)
RzIOPlugin rz_io_plugin_sparse
static RzIODesc * __open(RzIO *io, const char *pathname, int rw, int mode)
#define RzIOSPARSE_OFF(x)
RZ_API RzLibStruct rizin_plugin
static int __write(RzIO *io, RzIODesc *fd, const ut8 *buf, int count)
#define RzIOSPARSE_BUF(x)
static ut64 __lseek(RzIO *io, RzIODesc *fd, ut64 offset, int whence)
static int __close(RzIODesc *fd)
return memset(p, 0, total)
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char pathname
RZ_API st64 rz_buf_seek(RZ_NONNULL RzBuffer *b, st64 addr, int whence)
Modify the current cursor position in the buffer.
RZ_API st64 rz_buf_write_at(RZ_NONNULL RzBuffer *b, ut64 addr, RZ_NONNULL const ut8 *buf, ut64 len)
Write len bytes of the buffer at the specified address.
RZ_API st64 rz_buf_read_at(RZ_NONNULL RzBuffer *b, ut64 addr, RZ_NONNULL RZ_OUT ut8 *buf, ut64 len)
Read len bytes of the buffer at the specified address.
RZ_API void rz_buf_free(RzBuffer *b)
Free all internal data hold by the buffer and the buffer.
RZ_API RZ_OWN RzBuffer * rz_buf_new_sparse(ut8 Oxff)
Creates a sparse buffer.
RZ_API RzIODesc * rz_io_desc_new(RzIO *io, RzIOPlugin *plugin, const char *uri, int flags, int mode, void *data)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]