automount.o \
mount.o \
device.o \
- milestone.o \
+ target.o \
snapshot.o \
socket.o \
timer.o \
- snapshot system
-- s/milestone/target/
-
- hookup with battery status, suspend/resume
- add a job mode which shuts everything down but what is requested
[NAME_SERVICE] = "Service",
[NAME_TIMER] = "Timer",
[NAME_SOCKET] = "Socket",
- [NAME_MILESTONE] = "Milestone",
+ [NAME_TARGET] = "Target",
[NAME_DEVICE] = "Device",
[NAME_MOUNT] = "Mount",
[NAME_AUTOMOUNT] = "Automount",
int main(int argc, char *argv[]) {
Manager *m = NULL;
- Name *milestone = NULL, *syslog = NULL;
+ Name *target = NULL, *syslog = NULL;
Job *job = NULL;
int r, retval = 1;
goto finish;
}
- if ((r = manager_load_name(m, "default.milestone", &milestone)) < 0) {
- log_error("Failed to load default milestone: %s", strerror(-r));
+ if ((r = manager_load_name(m, "default.target", &target)) < 0) {
+ log_error("Failed to load default target: %s", strerror(-r));
goto finish;
}
goto finish;
}
- if ((r = manager_add_job(m, JOB_START, milestone, JOB_REPLACE, false, &job)) < 0) {
- log_error("Failed to start default milestone: %s", strerror(-r));
+ if ((r = manager_add_job(m, JOB_START, target, JOB_REPLACE, false, &job)) < 0) {
+ log_error("Failed to start default target: %s", strerror(-r));
goto finish;
}
+++ /dev/null
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
-
-#include "name.h"
-#include "milestone.h"
-#include "load-fragment.h"
-
-static void milestone_done(Name *n) {
- Milestone *m = MILESTONE(n);
-
- assert(m);
-
- /* Nothing here for now */
-}
-
-static NameActiveState milestone_active_state(Name *n) {
- return MILESTONE(n)->state == MILESTONE_DEAD ? NAME_INACTIVE : NAME_ACTIVE;
-}
-
-const NameVTable milestone_vtable = {
- .suffix = ".milestone",
-
- .init = name_load_fragment,
- .done = milestone_done,
-
- .active_state = milestone_active_state
-};
+++ /dev/null
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
-
-#ifndef foomilestonehfoo
-#define foomilestonehfoo
-
-typedef struct Milestone Milestone;
-
-#include "name.h"
-
-typedef enum MilestoneState {
- MILESTONE_DEAD,
- MILESTONE_ACTIVE
-} MilestoneState;
-
-struct Milestone {
- Meta meta;
-
- MilestoneState state;
-};
-
-extern const NameVTable milestone_vtable;
-
-#endif
[NAME_SERVICE] = &service_vtable,
[NAME_TIMER] = &timer_vtable,
[NAME_SOCKET] = &socket_vtable,
- [NAME_MILESTONE] = &milestone_vtable,
+ [NAME_TARGET] = &target_vtable,
[NAME_DEVICE] = &device_vtable,
[NAME_MOUNT] = &mount_vtable,
[NAME_AUTOMOUNT] = &automount_vtable,
NAME_SERVICE = 0,
NAME_TIMER,
NAME_SOCKET,
- NAME_MILESTONE,
+ NAME_TARGET,
NAME_DEVICE,
NAME_MOUNT,
NAME_AUTOMOUNT,
#include "service.h"
#include "timer.h"
#include "socket.h"
-#include "milestone.h"
+#include "target.h"
#include "device.h"
#include "mount.h"
#include "automount.h"
Service service;
Timer timer;
Socket socket;
- Milestone milestone;
+ Target target;
Device device;
Mount mount;
Automount automount;
DEFINE_CAST(SOCKET, Socket);
DEFINE_CAST(TIMER, Timer);
DEFINE_CAST(SERVICE, Service);
-DEFINE_CAST(MILESTONE, Milestone);
+DEFINE_CAST(TARGET, Target);
DEFINE_CAST(DEVICE, Device);
DEFINE_CAST(MOUNT, Mount);
DEFINE_CAST(AUTOMOUNT, Automount);
--- /dev/null
+/*-*- Mode: C; c-basic-offset: 8 -*-*/
+
+#include "name.h"
+#include "target.h"
+#include "load-fragment.h"
+
+static void target_done(Name *n) {
+ Target *m = TARGET(n);
+
+ assert(m);
+
+ /* Nothing here for now */
+}
+
+static NameActiveState target_active_state(Name *n) {
+ return TARGET(n)->state == TARGET_DEAD ? NAME_INACTIVE : NAME_ACTIVE;
+}
+
+const NameVTable target_vtable = {
+ .suffix = ".target",
+
+ .init = name_load_fragment,
+ .done = target_done,
+
+ .active_state = target_active_state
+};
--- /dev/null
+/*-*- Mode: C; c-basic-offset: 8 -*-*/
+
+#ifndef footargethfoo
+#define footargethfoo
+
+typedef struct Target Target;
+
+#include "name.h"
+
+typedef enum TargetState {
+ TARGET_DEAD,
+ TARGET_ACTIVE
+} TargetState;
+
+struct Target {
+ Meta meta;
+
+ TargetState state;
+};
+
+extern const NameVTable target_vtable;
+
+#endif
+++ /dev/null
-[Meta]
-Names=multiuser.milestone
-Wants=postfix.socket syslog.socket
-Description=Default Milestone
--- /dev/null
+[Meta]
+Names=multiuser.target
+Wants=postfix.socket syslog.socket
+Description=Default Target