device-internal.h revision 107f2e2526d476c6cc9b81a690391c111027d641
/***
This file is part of systemd.
Copyright 2008-2012 Kay Sievers <kay@vrfy.org>
Copyright 2014 Tom Gundersen <teg@jklm.no>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
#include "hashmap.h"
#include "set.h"
struct sd_device {
bool parent_set; /* no need to try to reload parent */
/* the subset of the properties that should be written to the db*/
bool sysattrs_read; /* don't try to re-read sysattrs once read */
bool property_tags_outdated; /* need to update TAGS= property */
bool property_devlinks_outdated; /* need to update DEVLINKS= property */
int devlink_priority;
char **properties_strv; /* the properties hashmap as a strv */
bool properties_buf_outdated; /* need to reread hashmap */
int watch_handle;
char *syspath;
const char *devpath;
const char *sysnum;
char *sysname;
bool sysname_set; /* don't reread sysname */
char *devtype;
int ifindex;
char *devname;
char *subsystem;
bool subsystem_set; /* don't reread subsystem */
char *driver;
bool driver_set; /* don't reread driver */
char *id_filename;
bool is_initialized;
bool uevent_loaded; /* don't reread uevent */
bool db_loaded; /* don't reread db */
bool db_persist; /* don't clean up the db when switching from initrd to real root */
};
typedef enum DeviceAction {
_DEVICE_ACTION_INVALID = -1,
} DeviceAction;