fix up some implicit declarations
Change-Id: Ia98bb5bea04a9cb87bf1993687e7f91f46022509
This commit is contained in:
parent
e62132bb6d
commit
7adeadce47
@ -38,6 +38,8 @@
|
||||
#include "mounts.h"
|
||||
#include "flashutils/flashutils.h"
|
||||
#include "edify/expr.h"
|
||||
#include <libgen.h>
|
||||
|
||||
|
||||
int signature_check_enabled = 1;
|
||||
int script_assert_enabled = 1;
|
||||
@ -639,6 +641,8 @@ int extendedcommand_file_exists()
|
||||
return 0 == stat(EXTENDEDCOMMAND_SCRIPT, &file_info);
|
||||
}
|
||||
|
||||
void process_volumes();
|
||||
|
||||
int edify_main(int argc, char** argv) {
|
||||
load_volume_table();
|
||||
process_volumes();
|
||||
|
@ -44,4 +44,6 @@ wipe_battery_stats();
|
||||
|
||||
void create_fstab();
|
||||
|
||||
int has_datadata();
|
||||
int has_datadata();
|
||||
|
||||
void handle_failure(int ret);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "cutils/log.h"
|
||||
#include "flashutils.h"
|
||||
|
||||
#if 0
|
||||
#define LOG_TAG "flash_image"
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "flashutils/flashutils.h"
|
||||
|
||||
|
39
nandroid.c
39
nandroid.c
@ -37,6 +37,25 @@
|
||||
|
||||
#include "extendedcommands.h"
|
||||
#include "nandroid.h"
|
||||
#include "flashutils/flashutils.h"
|
||||
#include <libgen.h>
|
||||
|
||||
|
||||
void nandroid_generate_timestamp_path(const char* backup_path)
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
struct tm *tmp = localtime(&t);
|
||||
if (tmp == NULL)
|
||||
{
|
||||
struct timeval tp;
|
||||
gettimeofday(&tp, NULL);
|
||||
sprintf(backup_path, "/sdcard/clockworkmod/backup/%d", tp.tv_sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
strftime(backup_path, PATH_MAX, "/sdcard/clockworkmod/backup/%F.%H.%M.%S", tmp);
|
||||
}
|
||||
}
|
||||
|
||||
int print_and_error(const char* message) {
|
||||
ui_print("%s", message);
|
||||
@ -45,7 +64,7 @@ int print_and_error(const char* message) {
|
||||
|
||||
int yaffs_files_total = 0;
|
||||
int yaffs_files_count = 0;
|
||||
void yaffs_callback(char* filename)
|
||||
void yaffs_callback(const char* filename)
|
||||
{
|
||||
char* justfile = basename(filename);
|
||||
if (strlen(justfile) < 30)
|
||||
@ -56,7 +75,7 @@ void yaffs_callback(char* filename)
|
||||
ui_reset_text_col();
|
||||
}
|
||||
|
||||
void compute_directory_stats(char* directory)
|
||||
void compute_directory_stats(const char* directory)
|
||||
{
|
||||
char tmp[PATH_MAX];
|
||||
sprintf(tmp, "find %s | wc -l > /tmp/dircount", directory);
|
||||
@ -380,22 +399,6 @@ int nandroid_restore(const char* backup_path, int restore_boot, int restore_syst
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nandroid_generate_timestamp_path(char* backup_path)
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
struct tm *tmp = localtime(&t);
|
||||
if (tmp == NULL)
|
||||
{
|
||||
struct timeval tp;
|
||||
gettimeofday(&tp, NULL);
|
||||
sprintf(backup_path, "/sdcard/clockworkmod/backup/%d", tp.tv_sec);
|
||||
}
|
||||
else
|
||||
{
|
||||
strftime(backup_path, PATH_MAX, "/sdcard/clockworkmod/backup/%F.%H.%M.%S", tmp);
|
||||
}
|
||||
}
|
||||
|
||||
int nandroid_usage()
|
||||
{
|
||||
printf("Usage: nandroid backup\n");
|
||||
|
@ -4,6 +4,5 @@
|
||||
int nandroid_main(int argc, char** argv);
|
||||
int nandroid_backup(const char* backup_path);
|
||||
int nandroid_restore(const char* backup_path, int restore_boot, int restore_system, int restore_data, int restore_cache, int restore_sdext, int restore_wimax);
|
||||
void nandroid_generate_timestamp_path(char* backup_path);
|
||||
|
||||
#endif
|
7
roots.c
7
roots.c
@ -28,6 +28,9 @@
|
||||
#include "common.h"
|
||||
#include "make_ext4fs.h"
|
||||
|
||||
#include "flashutils/flashutils.h"
|
||||
#include "extendedcommands.h"
|
||||
|
||||
int num_volumes;
|
||||
Volume* device_volumes;
|
||||
|
||||
@ -301,10 +304,6 @@ int format_volume(const char* volume) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(v->fs_type, "emmc") == 0) {
|
||||
return erase_raw_partition("emmc", v->device);
|
||||
}
|
||||
|
||||
if (strcmp(v->fs_type, "ext4") == 0) {
|
||||
reset_ext4fs_info();
|
||||
int result = make_ext4fs(v->device, NULL, NULL, 0, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user