diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-03-23 02:31:09 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-03-23 02:31:09 +0100 |
commit | 4ec9c3e79771aa95586390cecff4218cc8938160 (patch) | |
tree | e26e6bd8125ebcefbdf9674739df7573d17a040a /udev/udevadm-info.c | |
parent | 3c6ee190277f9d4bf39269fdb167f9c430633c9b (diff) |
use /run/udev/ if possible and fall back to /dev/.udev/
Diffstat (limited to 'udev/udevadm-info.c')
-rw-r--r-- | udev/udevadm-info.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index 33d113c5b1..9357f67208 100644 --- a/udev/udevadm-info.c +++ b/udev/udevadm-info.c @@ -218,6 +218,7 @@ int udevadm_info(struct udev *udev, int argc, char *argv[]) { "attribute-walk", no_argument, NULL, 'a' }, { "export-db", no_argument, NULL, 'e' }, { "root", no_argument, NULL, 'r' }, + { "run", no_argument, NULL, 'R' }, { "device-id-of-file", required_argument, NULL, 'd' }, { "export", no_argument, NULL, 'x' }, { "export-prefix", required_argument, NULL, 'P' }, @@ -247,7 +248,7 @@ int udevadm_info(struct udev *udev, int argc, char *argv[]) int option; struct stat statbuf; - option = getopt_long(argc, argv, "aed:n:p:q:rxP:Vh", options, NULL); + option = getopt_long(argc, argv, "aed:n:p:q:rxP:RVh", options, NULL); if (option == -1) break; @@ -331,6 +332,9 @@ int udevadm_info(struct udev *udev, int argc, char *argv[]) action = ACTION_ROOT; root = true; break; + case 'R': + printf("%s\n", udev_get_run_path(udev)); + goto exit; case 'd': action = ACTION_DEVICE_ID_FILE; util_strscpy(name, sizeof(name), optarg); |