fix up some implicit declarations

Change-Id: Ia98bb5bea04a9cb87bf1993687e7f91f46022509
This commit is contained in:
Koushik Dutta 2011-05-26 11:47:56 -07:00
parent e62132bb6d
commit 7adeadce47
7 changed files with 33 additions and 24 deletions

View File

@ -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();

View File

@ -44,4 +44,6 @@ wipe_battery_stats();
void create_fstab();
int has_datadata();
int has_datadata();
void handle_failure(int ret);

View File

@ -22,6 +22,7 @@
#include <unistd.h>
#include "cutils/log.h"
#include "flashutils.h"
#if 0
#define LOG_TAG "flash_image"

View File

@ -2,6 +2,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdio.h>
#include "flashutils/flashutils.h"

View File

@ -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");

View File

@ -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

View File

@ -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);