/systemd/src/hibernate-resume/ |
H A D | hibernate-resume.c | 31 const char *device; local 50 device = argv[1]; 52 if (stat(device, &st) < 0) { 53 log_error_errno(errno, "Failed to stat '%s': %m", device); 58 log_error("Resume device '%s' is not a block device.", device); 80 log_info("Could not resume from '%s' (%s).", device, major_minor);
|
/systemd/src/udev/v4l_id/ |
H A D | v4l_id.c | 38 char *device; local 46 printf("%s [-h,--help] <device file>\n\n" 47 "Video4Linux device identification.\n\n" 58 device = argv[optind]; 59 if (device == NULL) 62 fd = open(device, O_RDONLY);
|
/systemd/src/login/ |
H A D | logind-session-device.h | 36 Device *device; member in struct:SessionDevice
|
H A D | logind-core.c | 189 Device *device; local 196 device = hashmap_get(m->devices, udev_device_get_syspath(d)); 197 if (!device) 200 seat_add_to_gc_queue(device->seat); 201 device_free(device); 224 r = manager_add_device(m, udev_device_get_syspath(d), master, &device); 231 if (!device->seat) 232 device_free(device); 238 device_attach(device, seat); 489 * device w [all...] |
/systemd/src/udev/ |
H A D | udev-watch.c | 61 char device[UTIL_PATH_SIZE]; local 68 len = readlinkat(dirfd(dir), ent->d_name, device, sizeof(device)); 69 if (len <= 0 || len == (ssize_t)sizeof(device)) 71 device[len] = '\0'; 73 dev = udev_device_new_from_device_id(udev, device); 139 char device[UTIL_NAME_SIZE]; local 146 len = readlink(filename, device, sizeof(device)); 147 if (len <= 0 || (size_t)len == sizeof(device)) [all...] |
H A D | udev-builtin-hwdb.c | 115 /* avoid looking at any parent device, they are usually just a USB hub */ 133 { "device", required_argument, NULL, 'd' }, 139 const char *device = NULL; local 160 device = optarg; 180 /* read data from another device than the device we will store the data */ 181 if (device) { 182 srcdev = udev_device_new_from_device_id(udev_device_get_udev(dev), device);
|
H A D | udevadm-monitor.c | 40 static void print_device(struct udev_device *device, const char *source, int prop) { argument 47 udev_device_get_action(device), 48 udev_device_get_devpath(device), 49 udev_device_get_subsystem(device)); 53 udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(device)) 252 struct udev_device *device; local 254 device = udev_monitor_receive_device(kernel_monitor); 255 if (device == NULL) 257 print_device(device, "KERNEL", prop); 258 udev_device_unref(device); 260 struct udev_device *device; local [all...] |
H A D | udevadm-info.c | 53 static void print_all_attributes(struct udev_device *device, const char *key) { argument 56 udev_list_entry_foreach(sysattr, udev_device_get_sysattr_list_entry(device)) { 65 value = udev_device_get_sysattr_value(device, name); 85 static int print_device_chain(struct udev_device *device) { argument 90 "Udevadm info starts with the device specified by the devpath and then\n" 91 "walks up the chain of parent devices. It prints for every device\n" 93 "A rule to match, can be composed by the attributes of the device\n" 94 "and the attributes from one single parent device.\n" 97 printf(" looking at device '%s':\n", udev_device_get_devpath(device)); 130 print_record(struct udev_device *device) argument 182 struct udev_device *device; local 284 _cleanup_udev_device_unref_ struct udev_device *device = NULL; local [all...] |
/systemd/src/libsystemd-network/ |
H A D | dhcp-identifier.c | 62 _cleanup_udev_device_unref_ struct udev_device *device = NULL; local 76 device = udev_device_new_from_device_id(udev, ifindex_str); 77 if (device) { 78 if (udev_device_get_is_initialized(device) <= 0) 82 name = net_get_name(device);
|
H A D | network-internal.c | 40 const char *net_get_name(struct udev_device *device) { argument 43 assert(device); 45 /* fetch some persistent data unique (on this machine) to this device */ 47 name = udev_device_get_property_value(device, field); 57 int net_get_unique_predictable_data(struct udev_device *device, uint64_t *result) { argument 63 assert(device); 65 name = net_get_name(device); 79 /* Let's hash the machine ID plus the device name. We
|
/systemd/src/libudev/ |
H A D | libudev-device-internal.h | 24 #include "sd-device.h" 31 * Opaque object representing one kernel sys device. 36 /* real device object */ 37 sd_device *device; member in struct:udev_device
|
H A D | libudev-enumerate.c | 32 #include "sd-device.h" 35 #include "device-enumerator-private.h" 36 #include "device-util.h" 37 #include "libudev-device-internal.h" 50 * Opaque object representing one device lookup/sort context. 157 * Get the first entry of the sorted list of device paths. 165 sd_device *device; local 169 FOREACH_DEVICE_AND_SUBSYSTEM(udev_enumerate->enumerator, device) { 173 r = sd_device_get_syspath(device, &syspath); 191 * @subsystem: filter for a subsystem of the device t [all...] |
H A D | libudev-device-private.c | 23 #include "device-private.h" 24 #include "libudev-device-internal.h" 34 device_old = udev_device_old->device; 36 r = device_tag_index(udev_device->device, device_old, add); 48 r = device_update_db(udev_device->device); 60 r = device_delete_db(udev_device->device); 72 r = sd_device_get_ifindex(udev_device->device, &ifindex); 85 r = sd_device_get_property_value(udev_device->device, "DEVPATH_OLD", &devpath_old); 100 r = device_get_devnode_mode(udev_device->device, &mode); 115 r = device_get_devnode_uid(udev_device->device, 221 struct udev_device *device; local 261 struct udev_device *device; local 279 struct udev_device *device; local [all...] |
/systemd/src/shared/ |
H A D | generator.c | 41 _cleanup_free_ char *device = NULL, *escaped = NULL; local 53 r = unit_name_from_path(what, ".device", &device); 55 return log_error_errno(r, "Failed to convert device \"%s\" to unit name: %m", what); 78 device, 103 log_warning("Checking was requested for \"%s\", but it is not a device.", what); 161 /* Allow configuration how long we wait for a device that 163 * endless device timeouts for devices that show up only after 170 r = fstab_filter_options(opts, "comment=systemd.device-timeout\0" "x-systemd.device [all...] |
/systemd/src/rfkill/ |
H A D | rfkill.c | 61 struct udev_device *device; local 71 device = udev_device_new_from_subsystem_sysname(udev, "rfkill", sysname); 72 if (!device) 73 return log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, "Failed to open device: %m"); 75 name = udev_device_get_sysattr_value(device, "name"); 78 udev_device_unref(device); 82 log_debug("Operating on rfkill device '%s'.", name); 84 *ret = device; 90 struct udev_device *device, 99 assert(device); 88 wait_for_initialized( struct udev *udev, struct udev_device *device, struct udev_device **ret) argument 164 _cleanup_udev_device_unref_ struct udev_device *device = NULL; local 203 _cleanup_udev_device_unref_ struct udev_device *device = NULL; local 265 _cleanup_udev_device_unref_ struct udev_device *device = NULL; local [all...] |
/systemd/src/backlight/ |
H A D | backlight.c | 33 static struct udev_device *find_pci_or_platform_parent(struct udev_device *device) { argument 37 assert(device); 39 parent = udev_device_get_parent(device); 60 /* A connector DRM device, let's ignore all but LVDS and eDP! */ 75 log_warning("Cannot parse PCI class %s of device %s:%s.", 104 static bool validate_device(struct udev *udev, struct udev_device *device) { argument 112 assert(device); 115 * backlight device. For backlight devices there might be 124 * device to userspace. However, we still need to make sure 126 * device fo 205 get_max_brightness(struct udev_device *device) argument 235 clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) argument 273 _cleanup_udev_device_unref_ struct udev_device *device = NULL; local [all...] |
/systemd/src/core/ |
H A D | umount.c | 161 "%ms " /* device/file */ 327 static int delete_loopback(const char *device) { argument 331 fd = open(device, O_RDONLY|O_CLOEXEC);
|
H A D | swap.c | 375 log_error("Swap %s appeared twice with different device paths %s and %s", e, SWAP(u)->parameters_proc_swaps.what, what_proc_swaps); 431 static int swap_process_new(Manager *m, const char *device, int prio, bool set_flags) { argument 440 r = swap_setup_unit(m, device, device, prio, set_flags); 444 /* If this is a block device, then let's add duplicates for 445 * all other names of this block device */ 446 if (stat(device, &st) < 0 || !S_ISBLK(st.st_mode)) 453 /* Add the main device node */ 455 if (dn && !streq(dn, device)) 456 swap_setup_unit(m, dn, device, pri [all...] |
/systemd/src/cryptsetup/ |
H A D | cryptsetup-generator.c | 57 const char *device, 69 assert(device); 93 u = fstab_node_to_udev_node(device); 97 r = unit_name_from_path(u, ".device", &d); 113 "BindsTo=dev-mapper-%i.device\n" 137 r = unit_name_from_path(uu, ".device", &dd); 159 r = generator_write_timeouts(arg_dest, device, name, options, &filtered); 213 to = strjoin(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL); 223 dmname = strjoin("dev-mapper-", e, ".device", NULL); 227 r = write_drop_in(arg_dest, dmname, 90, "device 55 create_disk( const char *name, const char *device, const char *password, const char *options) argument 385 _cleanup_free_ char *name = NULL, *device = NULL, *keyfile = NULL, *options = NULL; local 433 _cleanup_free_ char *device = NULL; local [all...] |
H A D | cryptsetup.c | 26 #include "sd-device.h" 30 #include "device-util.h" 269 _cleanup_(sd_device_unrefp) sd_device *device = NULL; 282 r = sd_device_new_from_devnum(&device, 'b', st.st_rdev); 289 r = sd_device_get_property_value(device, i, &name); 298 _cleanup_free_ char *device = NULL; local 304 if (asprintf(&device, "/dev/mapper/%s", label) < 0) 312 if (path_equal(m->mnt_fsname, device)) 484 log_error("crypt_load() failed on device %s.\n", crypt_get_device_name(cd)); 544 log_info("Set cipher %s, mode %s, key size %i bits for device [all...] |
/systemd/src/fsck/ |
H A D | fsck.c | 31 #include "sd-device.h" 37 #include "device-util.h" 200 _cleanup_free_ char *device = NULL; local 204 if (fscanf(f, "%i %lu %lu %ms", &pass, &cur, &max, &device) != 4) { 233 fprintf(console, "\r%s: fsck %3.1f%% complete...\r%n", device, p, &m); 278 const char *device, *type; local 308 device = argv[1]; 310 if (stat(device, &st) < 0) { 311 r = log_error_errno(errno, "Failed to stat %s: %m", device); 316 log_error("%s is not a block device [all...] |
/systemd/src/test/ |
H A D | test-libudev.c | 34 static void print_device(struct udev_device *device) { argument 40 printf("*** device: %p ***\n", device); 41 str = udev_device_get_action(device); 45 str = udev_device_get_syspath(device); 48 str = udev_device_get_sysname(device); 51 str = udev_device_get_sysnum(device); 55 str = udev_device_get_devpath(device); 58 str = udev_device_get_subsystem(device); 62 str = udev_device_get_devtype(device); 108 _cleanup_udev_device_unref_ struct udev_device *device; local 122 _cleanup_udev_device_unref_ struct udev_device *device; local 149 struct udev_device *device; local 161 struct udev_device *device; local 198 struct udev_device *device; local 264 struct udev_device *device; local [all...] |
/systemd/src/udev/net/ |
H A D | link-config.c | 243 int link_config_get(link_config_ctx *ctx, struct udev_device *device, argument 248 assert(device); 254 attr_value = udev_device_get_sysattr_value(device, "address"); 260 udev_device_get_property_value(device, "ID_PATH"), 261 udev_device_get_driver(udev_device_get_parent(device)), 262 udev_device_get_property_value(device, "ID_NET_DRIVER"), 263 udev_device_get_devtype(device), 264 udev_device_get_sysname(device))) { 268 attr_value = udev_device_get_sysattr_value(device, "name_assign_type"); 273 log_warning("Config file %s applies to device base 300 mac_is_random(struct udev_device *device) argument 317 should_rename(struct udev_device *device, bool respect_predictable) argument 348 get_mac(struct udev_device *device, bool want_random, struct ether_addr *mac) argument 372 link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_device *device, const char **name) argument 481 link_get_driver(link_config_ctx *ctx, struct udev_device *device, char **ret) argument [all...] |
/systemd/src/network/ |
H A D | networkd-network.c | 301 int network_get(Manager *manager, struct udev_device *device, argument 311 if (device) { 312 path = udev_device_get_property_value(device, "ID_PATH"); 314 parent = udev_device_get_parent(device); 318 driver = udev_device_get_property_value(device, "ID_NET_DRIVER"); 320 devtype = udev_device_get_devtype(device); 331 if (network->match_name && device) { 335 attr = udev_device_get_sysattr_value(device, "name_assign_type");
|
/systemd/src/basic/ |
H A D | util.c | 278 /* If it is a partition find the originating device */ 508 _cleanup_close_ int fd = -1, device = -1; local 523 device = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY|O_CLOEXEC|O_NOCTTY); 524 if (device < 0) { 531 fd = openat(device, "type", O_RDONLY|O_CLOEXEC|O_NOCTTY); 547 fd = openat(device, "online", O_RDONLY|O_CLOEXEC|O_NOCTTY);
|