/systemd/src/udev/ |
H A D | udev-builtin-btrfs.c | 33 static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) { argument 41 fd = open("/dev/btrfs-control", O_RDWR|O_CLOEXEC); 50 udev_builtin_add_property(dev, test, "ID_BTRFS_READY", one_zero(err == 0));
|
H A D | udev-builtin-net_setup_link.c | 27 static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv, bool test) { argument 38 r = link_get_driver(ctx, dev, &driver); 40 udev_builtin_add_property(dev, test, "ID_NET_DRIVER", driver); 42 r = link_config_get(ctx, dev, &link); 53 r = link_config_apply(ctx, link, dev, &name); 55 log_error_errno(r, "Could not apply link config to %s: %m", udev_device_get_sysname(dev)); 59 udev_builtin_add_property(dev, test, "ID_NET_LINK_FILE", link->filename); 62 udev_builtin_add_property(dev, test, "ID_NET_NAME", name);
|
H A D | udev-builtin-uaccess.c | 32 static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool test) { argument 44 path = udev_device_get_devnode(dev); 45 seat = udev_device_get_property_value(dev, "ID_SEAT");
|
H A D | udev-watch.c | 63 struct udev_device *dev; local 73 dev = udev_device_new_from_device_id(udev, device); 74 if (dev == NULL) 77 log_debug("restoring old watch on '%s'", udev_device_get_devnode(dev)); 78 udev_watch_begin(udev, dev); 79 udev_device_unref(dev); 91 void udev_watch_begin(struct udev *udev, struct udev_device *dev) { argument 99 log_debug("adding watch on '%s'", udev_device_get_devnode(dev)); 100 wd = inotify_add_watch(inotify_fd, udev_device_get_devnode(dev), IN_CLOSE_WRITE); 103 inotify_fd, udev_device_get_devnode(dev), IN_CLOSE_WRIT 117 udev_watch_end(struct udev *udev, struct udev_device *dev) argument [all...] |
H A D | udevadm-test-builtin.c | 46 struct udev_device *dev = NULL; local 89 dev = udev_device_new_from_syspath(udev, filename); 90 if (dev == NULL) { 96 rc = udev_builtin_run(dev, cmd, command, true); 102 udev_device_unref(dev);
|
H A D | udev-builtin-kmod.c | 66 static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool test) { argument 67 struct udev *udev = udev_device_get_udev(dev);
|
H A D | udev-builtin.c | 121 int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const char *command, bool test) { argument 132 udev_build_argv(udev_device_get_udev(dev), arg, &argc, argv); 133 return builtins[cmd]->cmd(dev, argc, argv, test); 136 int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val) { argument 137 udev_device_add_property(dev, key, val);
|
H A D | udevadm-test.c | 50 _cleanup_udev_device_unref_ struct udev_device *dev = NULL; local 121 dev = udev_device_new_from_synthetic_event(udev, filename, action); 122 if (dev == NULL) { 129 udev_device_set_info_loaded(dev); 131 event = udev_event_new(dev); 141 udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
|
H A D | udev-builtin-blkid.c | 39 static void print_property(struct udev_device *dev, bool test, const char *name, const char *value) { argument 45 udev_builtin_add_property(dev, test, "ID_FS_TYPE", value); 48 udev_builtin_add_property(dev, test, "ID_FS_USAGE", value); 51 udev_builtin_add_property(dev, test, "ID_FS_VERSION", value); 55 udev_builtin_add_property(dev, test, "ID_FS_UUID", s); 57 udev_builtin_add_property(dev, test, "ID_FS_UUID_ENC", s); 61 udev_builtin_add_property(dev, test, "ID_FS_UUID_SUB", s); 63 udev_builtin_add_property(dev, test, "ID_FS_UUID_SUB_ENC", s); 67 udev_builtin_add_property(dev, test, "ID_FS_LABEL", s); 69 udev_builtin_add_property(dev, tes 107 find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) argument 223 builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool test) argument [all...] |
H A D | udev-builtin-hwdb.c | 35 int udev_builtin_hwdb_lookup(struct udev_device *dev, argument 56 if (udev_builtin_add_property(dev, test, key, value) < 0) 63 static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) { argument 67 v = udev_device_get_sysattr_value(dev, "idVendor"); 70 p = udev_device_get_sysattr_value(dev, "idProduct"); 83 static int udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device *srcdev, argument 91 assert(dev); 94 srcdev = dev; 122 r = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test); 130 static int builtin_hwdb(struct udev_device *dev, in argument [all...] |
H A D | udevadm-trigger.c | 87 " --name-match=NAME Trigger devices with this /dev name\n" 209 _cleanup_udev_device_unref_ struct udev_device *dev; local 211 dev = find_device(udev, optarg, "/sys"); 212 if (dev == NULL) { 217 r = udev_enumerate_add_match_parent(udev_enumerate, dev); 226 _cleanup_udev_device_unref_ struct udev_device *dev; local 228 dev = find_device(udev, optarg, "/dev/"); 229 if (dev == NULL) { 234 r = udev_enumerate_add_match_parent(udev_enumerate, dev); 253 _cleanup_udev_device_unref_ struct udev_device *dev; local [all...] |
H A D | udev-builtin-input_id.c | 52 static void extract_info(struct udev_device *dev, const char *devpath, bool test) { argument 71 udev_builtin_add_property(dev, test, "ID_INPUT_WIDTH_MM", width); 72 udev_builtin_add_property(dev, test, "ID_INPUT_HEIGHT_MM", height); 77 * @param dev udev_device 81 static void get_cap_mask(struct udev_device *dev, argument 133 static bool test_pointers(struct udev_device *dev, argument 168 udev_builtin_add_property(dev, test, "ID_INPUT_ACCELEROMETER", "1"); 220 udev_builtin_add_property(dev, test, "ID_INPUT_POINTINGSTICK", "1"); 222 udev_builtin_add_property(dev, test, "ID_INPUT_MOUSE", "1"); 224 udev_builtin_add_property(dev, tes 236 test_key(struct udev_device *dev, const unsigned long* bitmask_ev, const unsigned long* bitmask_key, bool test) argument 284 builtin_input_id(struct udev_device *dev, int argc, char *argv[], bool test) argument [all...] |
H A D | udev-builtin-keyboard.c | 35 static int install_force_release(struct udev_device *dev, const unsigned *release, unsigned release_count) { argument 44 assert(dev); 47 atkbd = udev_device_get_parent_with_subsystem_devtype(dev, "serio", NULL); 156 static void set_trackpoint_sensitivity(struct udev_device *dev, const char *value) argument 162 assert(dev); 166 pdev = udev_device_get_parent_with_subsystem_devtype(dev, "serio", NULL); 168 log_warning("Failed to get serio parent for '%s'", udev_device_get_devnode(dev)); 174 log_error("Unable to parse POINTINGSTICK_SENSITIVITY '%s' for '%s'", value, udev_device_get_devnode(dev)); 195 static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], bool test) { argument 202 node = udev_device_get_devnode(dev); [all...] |
H A D | udev-node.c | 36 static int node_symlink(struct udev_device *dev, const char *node, const char *slink) { argument 103 strscpyl(slink_tmp, sizeof(slink_tmp), slink, ".tmp-", udev_device_get_id_filename(dev), NULL); 129 static const char *link_find_prioritized(struct udev_device *dev, bool add, const char *stackdir, char *buf, size_t bufsize) { argument 130 struct udev *udev = udev_device_get_udev(dev); 136 priority = udev_device_get_devlink_priority(dev); 137 strscpy(buf, bufsize, udev_device_get_devnode(dev)); 157 if (streq(dent->d_name, udev_device_get_id_filename(dev))) 182 static void link_update(struct udev_device *dev, const char *slink, bool add) { argument 189 util_path_encode(slink + strlen("/dev"), name_enc, sizeof(name_enc)); 191 strscpyl(filename, sizeof(filename), dirname, "/", udev_device_get_id_filename(dev), NUL 224 udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old) argument 252 node_permissions_apply(struct udev_device *dev, bool apply, mode_t mode, uid_t uid, gid_t gid, struct udev_list *seclabel_list) argument 337 udev_node_add(struct udev_device *dev, bool apply, mode_t mode, uid_t uid, gid_t gid, struct udev_list *seclabel_list) argument 361 udev_node_remove(struct udev_device *dev) argument [all...] |
H A D | udev.h | 35 struct udev_device *dev; member in struct:udev_event 80 struct udev_event *udev_event_new(struct udev_device *dev); 100 void udev_watch_begin(struct udev *udev, struct udev_device *dev); 101 void udev_watch_end(struct udev *udev, struct udev_device *dev); 105 void udev_node_add(struct udev_device *dev, bool apply, 108 void udev_node_remove(struct udev_device *dev); 109 void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old); 167 int (*cmd)(struct udev_device *dev, int argc, char *argv[], bool test); 194 int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const char *command, bool test); 197 int udev_builtin_add_property(struct udev_device *dev, boo [all...] |
/systemd/src/login/ |
H A D | logind-session-device.h | 38 dev_t dev; member in struct:SessionDevice 47 int session_device_new(Session *s, dev_t dev, SessionDevice **out);
|
H A D | logind-session-dbus.c | 376 dev_t dev; local 389 dev = makedev(major, minor); 390 sd = hashmap_get(s->devices, &dev); 399 r = session_device_new(s, dev, &sd); 414 dev_t dev; local 427 dev = makedev(major, minor); 428 sd = hashmap_get(s->devices, &dev); 440 dev_t dev; local 453 dev = makedev(major, minor); 454 sd = hashmap_get(s->devices, &dev); [all...] |
H A D | logind-session-device.c | 51 major = major(sd->dev); 52 minor = minor(sd->dev); 252 static DeviceType detect_device_type(struct udev_device *dev) { argument 256 sysname = udev_device_get_sysname(dev); 257 subsystem = udev_device_get_subsystem(dev); 272 struct udev_device *dev, *p = NULL; local 276 dev = udev_device_new_from_devnum(sd->session->manager->udev, 'c', sd->dev); 277 if (!dev) 280 sp = udev_device_get_syspath(dev); 344 session_device_new(Session *s, dev_t dev, SessionDevice **out) argument [all...] |
/systemd/src/test/ |
H A D | test-udev.c | 44 { "test/dev", "/dev", "failed to mount test /dev" }, 80 _cleanup_udev_device_unref_ struct udev_device *dev = NULL; local 96 mac_selinux_init("/dev"); 113 dev = udev_device_new_from_synthetic_event(udev, syspath, action); 114 if (dev == NULL) { 119 event = udev_event_new(dev); 124 if (udev_device_get_devnode(dev) != NULL) { 127 if (streq(udev_device_get_subsystem(dev), "bloc [all...] |
/systemd/src/libudev/ |
H A D | libudev-util.c | 49 struct udev_device *dev; local 78 dev = udev_device_new_from_subsystem_sysname(udev, subsys, sysname); 79 if (dev == NULL) 85 val = udev_device_get_sysattr_value(dev, attr); 96 l = strpcpyl(&s, maxsize, udev_device_get_syspath(dev), NULL); 101 udev_device_unref(dev);
|
/systemd/src/shared/ |
H A D | sleep-config.c | 195 _cleanup_free_ char *dev = NULL, *type = NULL; local 205 &dev, &type, &size_field, &used_field); 214 if (streq(type, "partition") && endswith(dev, "\\040(deleted)")) { 215 log_warning("Ignoring deleted swapfile '%s'.", dev);
|
/systemd/src/core/ |
H A D | umount.c | 112 * /dev/console). Also, ignore all mounts below API 119 path_startswith(p, "/dev") || 157 char *dev = NULL, *d; local 166 &dev); 173 free(dev); 177 if (endswith(dev, " (deleted)")) { 178 free(dev); 182 r = cunescape(dev, UNESCAPE_RELAX, &d); 183 free(dev); 354 .dev [all...] |
H A D | device.c | 217 static int device_update_description(Unit *u, struct udev_device *dev, const char *path) { argument 222 assert(dev); 225 model = udev_device_get_property_value(dev, "ID_MODEL_FROM_DATABASE"); 227 model = udev_device_get_property_value(dev, "ID_MODEL"); 233 label = udev_device_get_property_value(dev, "ID_FS_LABEL"); 235 label = udev_device_get_property_value(dev, "ID_PART_ENTRY_NAME"); 237 label = udev_device_get_property_value(dev, "ID_PART_ENTRY_NUMBER"); 258 static int device_add_udev_wants(Unit *u, struct udev_device *dev) { argument 266 assert(dev); 269 wants = udev_device_get_property_value(dev, propert 294 device_setup_unit(Manager *m, struct udev_device *dev, const char *path, bool main) argument 378 device_process_new(Manager *m, struct udev_device *dev) argument 523 device_is_ready(struct udev_device *dev) argument 675 _cleanup_udev_device_unref_ struct udev_device *dev = NULL; local 701 _cleanup_udev_device_unref_ struct udev_device *dev = NULL; local 784 _cleanup_udev_device_unref_ struct udev_device *dev = NULL; local [all...] |
H A D | namespace.c | 30 #include "dev-setup.h" 136 "/dev/null\0" 137 "/dev/zero\0" 138 "/dev/full\0" 139 "/dev/random\0" 140 "/dev/urandom\0" 141 "/dev/tty\0"; 143 char temporary_mount[] = "/tmp/namespace-dev-XXXXXX"; 144 const char *d, *dev = NULL, *devpts = NULL, *devshm = NULL, *devhugepages = NULL, *devmqueue = NULL, *devlog = NULL, *devptmx = NULL; local 155 dev [all...] |
/systemd/src/basic/ |
H A D | fs-util.c | 421 int mknod_atomic(const char *path, mode_t mode, dev_t dev) { argument 431 if (mknod(t, mode, dev) < 0)
|