init: Move prototypes for util.c into util.h

Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
This commit is contained in:
Colin Cross 2010-04-13 20:35:46 -07:00
parent 9c5366ba55
commit 3899e9fc01
7 changed files with 32 additions and 10 deletions

View File

@ -36,6 +36,7 @@
#include "property_service.h"
#include "devices.h"
#include "parser.h"
#include "util.h"
#include <private/android_filesystem_config.h>

View File

@ -45,6 +45,7 @@
#include "signal_handler.h"
#include "keychords.h"
#include "parser.h"
#include "util.h"
static int property_triggers_enabled = 0;

View File

@ -17,16 +17,8 @@
#ifndef _INIT_INIT_H
#define _INIT_INIT_H
int mtd_name_to_number(const char *name);
void handle_control_message(const char *msg, const char *arg);
int create_socket(const char *name, int type, mode_t perm,
uid_t uid, gid_t gid);
void *read_file(const char *fn, unsigned *_sz);
time_t gettime(void);
void log_init(void);
void log_set_level(int level);
void log_close(void);
@ -40,8 +32,6 @@ void log_write(int level, const char *fmt, ...)
#define LOG_DEFAULT_LEVEL 3 /* messages <= this level are logged */
#define LOG_UEVENTS 0 /* log uevent messages if 1. verbose */
unsigned int decode_uid(const char *s);
struct listnode
{
struct listnode *next;

View File

@ -10,6 +10,7 @@
#include "init.h"
#include "property_service.h"
#include "parser.h"
#include "util.h"
#include <cutils/iosched_policy.h>

View File

@ -43,6 +43,7 @@
#include "property_service.h"
#include "init.h"
#include "util.h"
#define PERSISTENT_PROPERTY_DIR "/data/property"

View File

@ -26,6 +26,7 @@
#include <sys/reboot.h>
#include "init.h"
#include "util.h"
static int signal_fd = -1;
static int signal_recv_fd = -1;

27
init/util.h Normal file
View File

@ -0,0 +1,27 @@
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _INIT_UTIL_H_
#define _INIT_UTIL_H_
int mtd_name_to_number(const char *name);
int create_socket(const char *name, int type, mode_t perm,
uid_t uid, gid_t gid);
void *read_file(const char *fn, unsigned *_sz);
time_t gettime(void);
unsigned int decode_uid(const char *s);
#endif