util: split out escaping code into escape.[ch]
This really deserves its own file, given how much code this is now.
This commit is contained in:
+11
-8
@@ -23,17 +23,20 @@
|
||||
|
||||
#include "sd-id128.h"
|
||||
#include "sd-messages.h"
|
||||
#include "set.h"
|
||||
#include "unit.h"
|
||||
#include "macro.h"
|
||||
#include "strv.h"
|
||||
#include "log.h"
|
||||
#include "dbus-job.h"
|
||||
#include "special.h"
|
||||
|
||||
#include "async.h"
|
||||
#include "virt.h"
|
||||
#include "dbus-job.h"
|
||||
#include "dbus.h"
|
||||
#include "escape.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "set.h"
|
||||
#include "special.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "unit.h"
|
||||
#include "virt.h"
|
||||
#include "job.h"
|
||||
|
||||
Job* job_new_raw(Unit *unit) {
|
||||
Job *j;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "cpu-set-util.h"
|
||||
#include "env-util.h"
|
||||
#include "errno-list.h"
|
||||
#include "escape.h"
|
||||
#include "ioprio.h"
|
||||
#include "log.h"
|
||||
#include "missing.h"
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "dbus-unit.h"
|
||||
#include "dbus.h"
|
||||
#include "env-util.h"
|
||||
#include "escape.h"
|
||||
#include "exit-status.h"
|
||||
#include "hashmap.h"
|
||||
#include "locale-setup.h"
|
||||
|
||||
+14
-12
@@ -20,26 +20,28 @@
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "manager.h"
|
||||
#include "unit.h"
|
||||
#include "mount.h"
|
||||
#include "log.h"
|
||||
#include "sd-messages.h"
|
||||
#include "strv.h"
|
||||
#include "mkdir.h"
|
||||
#include "path-util.h"
|
||||
#include "mount-setup.h"
|
||||
#include "unit-name.h"
|
||||
|
||||
#include "dbus-mount.h"
|
||||
#include "special.h"
|
||||
#include "escape.h"
|
||||
#include "exit-status.h"
|
||||
#include "fstab-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "fstab-util.h"
|
||||
#include "log.h"
|
||||
#include "manager.h"
|
||||
#include "mkdir.h"
|
||||
#include "mount-setup.h"
|
||||
#include "mount.h"
|
||||
#include "path-util.h"
|
||||
#include "smack-util.h"
|
||||
#include "special.h"
|
||||
#include "strv.h"
|
||||
#include "unit-name.h"
|
||||
#include "unit.h"
|
||||
|
||||
#define RETRY_UMOUNT_MAX 32
|
||||
|
||||
|
||||
+19
-18
@@ -24,30 +24,31 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "async.h"
|
||||
#include "manager.h"
|
||||
#include "unit.h"
|
||||
#include "service.h"
|
||||
#include "load-fragment.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-kernel.h"
|
||||
#include "bus-util.h"
|
||||
#include "dbus-service.h"
|
||||
#include "def.h"
|
||||
#include "env-util.h"
|
||||
#include "escape.h"
|
||||
#include "exit-status.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "load-dropin.h"
|
||||
#include "load-fragment.h"
|
||||
#include "log.h"
|
||||
#include "manager.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "special.h"
|
||||
#include "strv.h"
|
||||
#include "unit-name.h"
|
||||
#include "unit-printf.h"
|
||||
#include "dbus-service.h"
|
||||
#include "special.h"
|
||||
#include "exit-status.h"
|
||||
#include "def.h"
|
||||
#include "path-util.h"
|
||||
#include "util.h"
|
||||
#include "unit.h"
|
||||
#include "utf8.h"
|
||||
#include "env-util.h"
|
||||
#include "fileio.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "bus-kernel.h"
|
||||
#include "formats-util.h"
|
||||
#include "process-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "util.h"
|
||||
#include "service.h"
|
||||
|
||||
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
|
||||
[SERVICE_DEAD] = UNIT_INACTIVE,
|
||||
|
||||
+11
-10
@@ -20,22 +20,23 @@
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <libudev.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/stat.h>
|
||||
#include <libudev.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "unit.h"
|
||||
#include "swap.h"
|
||||
#include "unit-name.h"
|
||||
#include "dbus-swap.h"
|
||||
#include "special.h"
|
||||
#include "escape.h"
|
||||
#include "exit-status.h"
|
||||
#include "path-util.h"
|
||||
#include "virt.h"
|
||||
#include "udev-util.h"
|
||||
#include "fstab-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "fstab-util.h"
|
||||
#include "path-util.h"
|
||||
#include "special.h"
|
||||
#include "udev-util.h"
|
||||
#include "unit-name.h"
|
||||
#include "unit.h"
|
||||
#include "virt.h"
|
||||
#include "swap.h"
|
||||
|
||||
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
|
||||
[SWAP_DEAD] = UNIT_INACTIVE,
|
||||
|
||||
+6
-5
@@ -21,20 +21,21 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/dm-ioctl.h>
|
||||
#include <linux/loop.h>
|
||||
#include <string.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/swap.h>
|
||||
#include <linux/loop.h>
|
||||
#include <linux/dm-ioctl.h>
|
||||
|
||||
#include "escape.h"
|
||||
#include "libudev.h"
|
||||
#include "list.h"
|
||||
#include "mount-setup.h"
|
||||
#include "umount.h"
|
||||
#include "path-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "util.h"
|
||||
#include "virt.h"
|
||||
#include "libudev.h"
|
||||
#include "udev-util.h"
|
||||
#include "umount.h"
|
||||
|
||||
typedef struct MountPoint {
|
||||
char *path;
|
||||
|
||||
+24
-21
@@ -20,36 +20,39 @@
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
#include "sd-messages.h"
|
||||
#include "set.h"
|
||||
#include "macro.h"
|
||||
#include "strv.h"
|
||||
#include "path-util.h"
|
||||
#include "log.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "missing.h"
|
||||
#include "mkdir.h"
|
||||
#include "fileio-label.h"
|
||||
#include "formats-util.h"
|
||||
#include "process-util.h"
|
||||
#include "virt.h"
|
||||
|
||||
#include "bus-common-errors.h"
|
||||
#include "bus-util.h"
|
||||
#include "dropin.h"
|
||||
#include "unit-name.h"
|
||||
#include "special.h"
|
||||
#include "unit.h"
|
||||
#include "load-fragment.h"
|
||||
#include "load-dropin.h"
|
||||
#include "dbus.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "dbus-unit.h"
|
||||
#include "dbus.h"
|
||||
#include "dropin.h"
|
||||
#include "escape.h"
|
||||
#include "execute.h"
|
||||
#include "fileio-label.h"
|
||||
#include "formats-util.h"
|
||||
#include "load-dropin.h"
|
||||
#include "load-fragment.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "mkdir.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
#include "set.h"
|
||||
#include "special.h"
|
||||
#include "strv.h"
|
||||
#include "unit-name.h"
|
||||
#include "virt.h"
|
||||
|
||||
#include "unit.h"
|
||||
|
||||
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
|
||||
[UNIT_SERVICE] = &service_vtable,
|
||||
|
||||
Reference in New Issue
Block a user