diff options
| author | Colin Cross <ccross@android.com> | 2010-04-13 20:35:46 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2010-04-13 22:52:10 -0700 |
| commit | 3899e9fc01cf608f19f716749c54cc5c4d17e766 (patch) | |
| tree | 5256f744a9732e7776e8f1fa85322ad0403839a0 /init | |
| parent | 9c5366ba55b1553b2d66f48e3d14fbd274a2944d (diff) | |
| download | system_core-3899e9fc01cf608f19f716749c54cc5c4d17e766.tar.gz system_core-3899e9fc01cf608f19f716749c54cc5c4d17e766.tar.bz2 system_core-3899e9fc01cf608f19f716749c54cc5c4d17e766.zip | |
init: Move prototypes for util.c into util.h
Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
Diffstat (limited to 'init')
| -rw-r--r-- | init/builtins.c | 1 | ||||
| -rwxr-xr-x | init/init.c | 1 | ||||
| -rw-r--r-- | init/init.h | 10 | ||||
| -rw-r--r-- | init/parser.c | 1 | ||||
| -rw-r--r-- | init/property_service.c | 1 | ||||
| -rw-r--r-- | init/signal_handler.c | 1 | ||||
| -rw-r--r-- | init/util.h | 27 |
7 files changed, 32 insertions, 10 deletions
diff --git a/init/builtins.c b/init/builtins.c index 8e5eed81..76969547 100644 --- a/init/builtins.c +++ b/init/builtins.c @@ -36,6 +36,7 @@ #include "property_service.h" #include "devices.h" #include "parser.h" +#include "util.h" #include <private/android_filesystem_config.h> diff --git a/init/init.c b/init/init.c index b76fa667..3d619b90 100755 --- a/init/init.c +++ b/init/init.c @@ -45,6 +45,7 @@ #include "signal_handler.h" #include "keychords.h" #include "parser.h" +#include "util.h" static int property_triggers_enabled = 0; diff --git a/init/init.h b/init/init.h index 4d0593d5..1ebdbac6 100644 --- a/init/init.h +++ b/init/init.h @@ -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; diff --git a/init/parser.c b/init/parser.c index 9ea92745..9424e7ed 100644 --- a/init/parser.c +++ b/init/parser.c @@ -10,6 +10,7 @@ #include "init.h" #include "property_service.h" #include "parser.h" +#include "util.h" #include <cutils/iosched_policy.h> diff --git a/init/property_service.c b/init/property_service.c index 28160f8f..b1c65527 100644 --- a/init/property_service.c +++ b/init/property_service.c @@ -43,6 +43,7 @@ #include "property_service.h" #include "init.h" +#include "util.h" #define PERSISTENT_PROPERTY_DIR "/data/property" diff --git a/init/signal_handler.c b/init/signal_handler.c index 56352f14..b16eef10 100644 --- a/init/signal_handler.c +++ b/init/signal_handler.c @@ -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; diff --git a/init/util.h b/init/util.h new file mode 100644 index 00000000..4f473ecc --- /dev/null +++ b/init/util.h @@ -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 |
