Closes #11333.
#include "udevadm.h"
#include "udev-ctrl.h"
#include "util.h"
+#include "virt.h"
static int help(void) {
printf("%s control OPTION\n\n"
if (r < 0)
return r;
+ if (running_in_chroot() > 0) {
+ log_info("Running in chroot, ignoring request.");
+ return 0;
+ }
+
if (argc <= 1)
log_error("Option missing");
#include "signal-util.h"
#include "string-util.h"
#include "udevadm.h"
+#include "virt.h"
static bool arg_show_property = false;
static bool arg_print_kernel = false;
if (r <= 0)
goto finalize;
+ if (running_in_chroot() > 0) {
+ log_info("Running in chroot, ignoring request.");
+ return 0;
+ }
+
/* Callers are expecting to see events as they happen: Line buffering */
setlinebuf(stdout);
#include "udevadm.h"
#include "udev-ctrl.h"
#include "util.h"
+#include "virt.h"
static usec_t arg_timeout = 120 * USEC_PER_SEC;
static const char *arg_exists = NULL;
if (r <= 0)
return r;
+ if (running_in_chroot() > 0) {
+ log_info("Running in chroot, ignoring request.");
+ return 0;
+ }
+
deadline = now(CLOCK_MONOTONIC) + arg_timeout;
/* guarantee that the udev daemon isn't pre-processing */
#include "strv.h"
#include "udevadm.h"
#include "udevadm-util.h"
+#include "virt.h"
static bool arg_verbose = false;
static bool arg_dry_run = false;
bool settle = false;
int c, r;
+ if (running_in_chroot() > 0) {
+ log_info("Running in chroot, ignoring request.");
+ return 0;
+ }
+
r = sd_device_enumerator_new(&e);
if (r < 0)
return r;