mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Add more logging around udev
This commit is contained in:
		
							parent
							
								
									e2ee67125e
								
							
						
					
					
						commit
						ae77004346
					
				
					 1 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
					@ -147,12 +147,16 @@ static int udev_event(int fd, uint32_t mask, void *data) {
 | 
				
			||||||
		return 1;
 | 
							return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						const char *action = udev_device_get_action(dev);
 | 
				
			||||||
	const char *path = udev_device_get_devnode(dev);
 | 
						const char *path = udev_device_get_devnode(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wlr_log(L_DEBUG, "udev event for %s (%s)",
 | 
				
			||||||
 | 
								udev_device_get_sysname(dev), action);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!path || strcmp(path, udev->drm_path) != 0) {
 | 
						if (!path || strcmp(path, udev->drm_path) != 0) {
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const char *action = udev_device_get_action(dev);
 | 
					 | 
				
			||||||
	if (!action || strcmp(action, "change") != 0) {
 | 
						if (!action || strcmp(action, "change") != 0) {
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -190,8 +194,7 @@ bool wlr_udev_init(struct wl_display *display, struct wlr_udev *udev) {
 | 
				
			||||||
		goto error_mon;
 | 
							goto error_mon;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	udev->drm_path = NULL;
 | 
						wlr_log(L_DEBUG, "Successfully initialized udev");
 | 
				
			||||||
 | 
					 | 
				
			||||||
	return true;
 | 
						return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
error_mon:
 | 
					error_mon:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue