]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/device.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / core / device.h
index 10ab113176e0d1fdebb60a924c5ee21371d41fff..a551e7748a8f7f108bada794fa69682459423306 100644 (file)
@@ -1,5 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
 /***
 
 typedef struct Device Device;
 
-/* We simply watch devices, we cannot plug/unplug them. That
- * simplifies the state engine greatly */
-typedef enum DeviceState {
-        DEVICE_DEAD,
-        DEVICE_TENTATIVE, /* mounted or swapped, but not (yet) announced by udev */
-        DEVICE_PLUGGED,   /* announced by udev */
-        _DEVICE_STATE_MAX,
-        _DEVICE_STATE_INVALID = -1
-} DeviceState;
-
 typedef enum DeviceFound {
         DEVICE_NOT_FOUND = 0,
         DEVICE_FOUND_UDEV = 1,
@@ -52,11 +41,11 @@ struct Device {
         LIST_FIELDS(struct Device, same_sysfs);
 
         DeviceState state, deserialized_state;
+
+        bool bind_mounts;
 };
 
 extern const UnitVTable device_vtable;
 
-const char* device_state_to_string(DeviceState i) _const_;
-DeviceState device_state_from_string(const char *s) _pure_;
-
 int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now);
+bool device_shall_be_bound_by(Unit *device, Unit *u);