mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Use <> instead of "" for external header includes
Libraries and system headers should be included with <> instead of "". This makes a great difference for the automatic dependency tracking. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <lite/lite.h>
|
||||
#include <uev/uev.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "finit.h"
|
||||
@@ -39,9 +41,6 @@
|
||||
#include "sig.h"
|
||||
#include "service.h"
|
||||
|
||||
#include "lite/lite.h"
|
||||
#include "uev/uev.h"
|
||||
|
||||
uev_t api_watcher;
|
||||
|
||||
/* Allowed characters in job/id/name */
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static int do_send(int cmd, int runlevel)
|
||||
{
|
||||
|
||||
@@ -26,14 +26,13 @@
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/resource.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "cond.h"
|
||||
#include "service.h"
|
||||
#include "tty.h"
|
||||
#include "lite/lite.h"
|
||||
#include "helpers.h"
|
||||
|
||||
#define MATCH_CMD(l, c, x) \
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "sig.h"
|
||||
#include "helpers.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
#define NUM_ARGS 16
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h> /* umask(), mkdir() */
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "conf.h"
|
||||
@@ -37,7 +38,6 @@
|
||||
#include "service.h"
|
||||
#include "sig.h"
|
||||
#include "tty.h"
|
||||
#include "lite/lite.h"
|
||||
#include "inetd.h"
|
||||
#include "sm.h"
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <utmp.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "private.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static int encode(int lvl)
|
||||
{
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "uev/uev.h"
|
||||
#include "lite/lite.h"
|
||||
#include <uev/uev.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "inetd.h"
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
|
||||
#include <netdb.h>
|
||||
#include <net/if.h>
|
||||
#include <uev/uev.h>
|
||||
|
||||
#include "queue.h"
|
||||
#include "uev/uev.h"
|
||||
|
||||
typedef struct svc svc_t;
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "finit.h"
|
||||
@@ -33,8 +34,6 @@
|
||||
#include "helpers.h"
|
||||
#include "service.h"
|
||||
|
||||
#include "lite/lite.h"
|
||||
|
||||
typedef struct {
|
||||
char *cmd;
|
||||
int (*cb)(char *arg);
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "helpers.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <dirent.h> /* readdir() et al */
|
||||
#include <poll.h>
|
||||
#include <string.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "finit.h"
|
||||
@@ -33,7 +34,6 @@
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
#include "queue.h" /* BSD sys/queue.h API */
|
||||
#include "lite/lite.h"
|
||||
|
||||
#define is_io_plugin(p) ((p)->io.cb && (p)->io.fd >= 0)
|
||||
|
||||
|
||||
@@ -24,9 +24,10 @@
|
||||
#ifndef FINIT_PLUGIN_H_
|
||||
#define FINIT_PLUGIN_H_
|
||||
|
||||
#include <uev/uev.h>
|
||||
|
||||
#include "queue.h" /* BSD sys/queue.h API */
|
||||
#include "svc.h"
|
||||
#include "uev/uev.h"
|
||||
|
||||
#define PLUGIN_DEP_MAX 10
|
||||
#define PLUGIN_IO_READ UEV_READ
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <lite/lite.h>
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void save(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+1
-1
@@ -23,12 +23,12 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <utmp.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
/*
|
||||
* Setup standard FHS 2.3 structure in /var, and write runlevel to UTMP
|
||||
|
||||
+1
-1
@@ -22,12 +22,12 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../finit.h"
|
||||
#include "../config.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+2
-1
@@ -21,10 +21,11 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void save(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+1
-1
@@ -30,6 +30,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h> /* read() */
|
||||
#include <sys/stat.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../finit.h"
|
||||
#include "../conf.h"
|
||||
@@ -37,7 +38,6 @@
|
||||
#include "../plugin.h"
|
||||
#include "../sig.h"
|
||||
#include "../service.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void parse(void *arg, int fd, int events);
|
||||
|
||||
|
||||
@@ -21,10 +21,11 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
+1
-1
@@ -27,12 +27,12 @@
|
||||
#include <unistd.h> /* read() */
|
||||
#include <sys/inotify.h>
|
||||
#include <sys/stat.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "../tty.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void watcher(void *arg, int fd, int events);
|
||||
|
||||
|
||||
+1
-1
@@ -25,12 +25,12 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h> /* gettimeofday() */
|
||||
#include <sys/types.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/if.h>
|
||||
#include "lite/lite.h"
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "conf.h"
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <string.h> /* strerror() */
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/wait.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "conf.h"
|
||||
@@ -51,7 +52,6 @@
|
||||
#include "private.h"
|
||||
#include "sig.h"
|
||||
#include "service.h"
|
||||
#include "lite/lite.h"
|
||||
|
||||
static int stopped = 0;
|
||||
static uev_t sighup_watcher, sigint_watcher, sigpwr_watcher;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define FINIT_SIG_H_
|
||||
|
||||
#include <signal.h>
|
||||
#include "uev/uev.h"
|
||||
#include <uev/uev.h>
|
||||
|
||||
#define SYNC_SHUTDOWN "/var/lock/finit.shutdown"
|
||||
#define SYNC_STOPPED "/var/lock/finit.stopped"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "lite/lite.h"
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "finit.h"
|
||||
#include "svc.h"
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#include <sys/ipc.h> /* IPC_CREAT */
|
||||
#include <sys/shm.h> /* shmat() */
|
||||
#include <sys/types.h> /* pid_t */
|
||||
#include "lite/lite.h"
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "inetd.h"
|
||||
#include "helpers.h"
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
#include <lite/lite.h>
|
||||
|
||||
#include "config.h" /* Generated by configure script */
|
||||
#include "finit.h"
|
||||
#include "conf.h"
|
||||
#include "helpers.h"
|
||||
#include "lite/lite.h"
|
||||
#include "tty.h"
|
||||
|
||||
LIST_HEAD(, tty_node) tty_list = LIST_HEAD_INITIALIZER();
|
||||
|
||||
Reference in New Issue
Block a user