-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.h
40 lines (36 loc) · 1.03 KB
/
main.h
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
36
37
38
39
40
#ifndef MAIN_H
#define MAIN_H
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <unistd.h>
#include <asm/unistd.h>
#include <linux/kdev_t.h>
#include <linux/limits.h>
#include <linux/reboot.h>
#include <linux/stat.h>
#include <linux/types.h>
#include <sys/mount.h>
#include <sys/reboot.h>
#include <sys/stat.h>
extern char **environ;
bool bootloader = false;
static inline void setup_rootfs();
static inline void populate_devices();
static inline void list_files(char *path);
static inline void klog(char *message);
static inline void show_error(char *target);
static inline void show_variables(int count, char *argument[]);
static inline void mount_rootfs();
static inline void print_file(char *path);
static bool mountpoint(char *path);
static inline void reboot_device(int command);
static inline void set_reason(char *parameter);
static inline int get_file_size(FILE *file);
const char *rootfs = "/dev/block/mmcblk0p31";
#endif