Preparation for dynamic tmpfs path

This commit is contained in:
topjohnwu
2020-04-12 05:34:56 -07:00
parent d739dcac2b
commit e0a281583d
13 changed files with 289 additions and 258 deletions

View File

@@ -1,11 +1,11 @@
#pragma once
#include <pthread.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <string>
#include <vector>
#include <socket.hpp>
// Commands require connecting to daemon
enum {
DO_NOTHING = 0,
@@ -18,6 +18,7 @@ enum {
MAGISKHIDE,
SQLITE_CMD,
REMOVE_MODULES,
GET_PATH,
};
// Return codes for daemon
@@ -32,25 +33,6 @@ enum {
int connect_daemon(bool create = false);
// socket.cpp
socklen_t setup_sockaddr(struct sockaddr_un *sun, const char *name);
int create_rand_socket(struct sockaddr_un *sun);
int socket_accept(int sockfd, int timeout);
void get_client_cred(int fd, struct ucred *cred);
int recv_fd(int sockfd);
void send_fd(int sockfd, int fd);
int read_int(int fd);
int read_int_be(int fd);
void write_int(int fd, int val);
void write_int_be(int fd, int val);
char *read_string(int fd);
char *read_string_be(int fd);
void write_string(int fd, const char *val);
void write_string_be(int fd, const char *val);
void write_key_value(int fd, const char *key, const char *val);
void write_key_token(int fd, const char *key, int tok);
/***************
* Boot Stages *
***************/