+static int snapshot_load(Unit *u) {
+ Snapshot *s = SNAPSHOT(u);
+
+ assert(u);
+ assert(u->meta.load_state == UNIT_STUB);
+
+ /* Make sure that only snapshots created via snapshot_create()
+ * can be loaded */
+ if (!s->by_snapshot_create && !s->meta.manager->deserializing)
+ return -ENOENT;
+
+ u->meta.load_state = UNIT_LOADED;
+ return 0;
+}
+