diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-01-15 12:04:08 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-01-16 13:34:42 +0100 |
commit | ac155bb885f9ea8aac3979a6b2686f0c8a9cc6e3 (patch) | |
tree | 6d78545bae4ffd262ddf4fd71d17ded342c530ca /src/dbus-mount.c | |
parent | 7d17cfbc46306a106dbda0f3e92fbc0792d1e9e9 (diff) |
unit: remove union Unit
Now that objects of all unit types are allocated the exact amount of
memory they need, the Unit union has lost its purpose. Remove it.
"Unit" is a more natural name for the base unit class than "Meta", so
rename Meta to Unit.
Access to members of the base class gets simplified.
Diffstat (limited to 'src/dbus-mount.c')
-rw-r--r-- | src/dbus-mount.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dbus-mount.c b/src/dbus-mount.c index cfbfd4531c..60f1e92415 100644 --- a/src/dbus-mount.c +++ b/src/dbus-mount.c @@ -136,20 +136,20 @@ static int bus_mount_append_type(DBusMessageIter *i, const char *property, void } DBusHandlerResult bus_mount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { - + Mount *m = MOUNT(u); const BusProperty properties[] = { BUS_UNIT_PROPERTIES, - { "org.freedesktop.systemd1.Mount", "Where", bus_property_append_string, "s", u->mount.where }, + { "org.freedesktop.systemd1.Mount", "Where", bus_property_append_string, "s", m->where }, { "org.freedesktop.systemd1.Mount", "What", bus_mount_append_what, "s", u }, { "org.freedesktop.systemd1.Mount", "Options", bus_mount_append_options, "s", u }, { "org.freedesktop.systemd1.Mount", "Type", bus_mount_append_type, "s", u }, - { "org.freedesktop.systemd1.Mount", "TimeoutUSec", bus_property_append_usec, "t", &u->mount.timeout_usec }, - BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", u->mount.exec_command+MOUNT_EXEC_MOUNT, "ExecMount"), - BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", u->mount.exec_command+MOUNT_EXEC_UNMOUNT, "ExecUnmount"), - BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", u->mount.exec_command+MOUNT_EXEC_REMOUNT, "ExecRemount"), - BUS_EXEC_CONTEXT_PROPERTIES("org.freedesktop.systemd1.Mount", u->mount.exec_context), - { "org.freedesktop.systemd1.Mount", "ControlPID", bus_property_append_pid, "u", &u->mount.control_pid }, - { "org.freedesktop.systemd1.Mount", "DirectoryMode", bus_property_append_mode, "u", &u->mount.directory_mode }, + { "org.freedesktop.systemd1.Mount", "TimeoutUSec", bus_property_append_usec, "t", &m->timeout_usec }, + BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", m->exec_command+MOUNT_EXEC_MOUNT, "ExecMount"), + BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", m->exec_command+MOUNT_EXEC_UNMOUNT, "ExecUnmount"), + BUS_EXEC_COMMAND_PROPERTY("org.freedesktop.systemd1.Mount", m->exec_command+MOUNT_EXEC_REMOUNT, "ExecRemount"), + BUS_EXEC_CONTEXT_PROPERTIES("org.freedesktop.systemd1.Mount", m->exec_context), + { "org.freedesktop.systemd1.Mount", "ControlPID", bus_property_append_pid, "u", &m->control_pid }, + { "org.freedesktop.systemd1.Mount", "DirectoryMode", bus_property_append_mode, "u", &m->directory_mode }, { NULL, NULL, NULL, NULL, NULL } }; |