chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
extras/keymap: add Zepto ZNote
[elogind.git]
/
udev
/
udevadm-info.c
diff --git
a/udev/udevadm-info.c
b/udev/udevadm-info.c
index 2ffce27ed71a76a04e171801dd0982d8a7e10235..88bb0d401ff2dcf2f5117b8b7bdd9a53d11e923b 100644
(file)
--- a/
udev/udevadm-info.c
+++ b/
udev/udevadm-info.c
@@
-144,15
+144,15
@@
static void print_record(struct udev_device *device)
i = udev_device_get_num_fake_partitions(device);
if (i != 0)
i = udev_device_get_num_fake_partitions(device);
if (i != 0)
- printf("A:%u\n", i);
+ printf("A:
%u\n", i);
i = udev_device_get_ignore_remove(device);
if (i != 0)
i = udev_device_get_ignore_remove(device);
if (i != 0)
- printf("R:%u\n", i);
+ printf("R:
%u\n", i);
i = udev_device_get_watch_handle(device);
if (i >= 0)
i = udev_device_get_watch_handle(device);
if (i >= 0)
- printf("W:%u\n", i);
+ printf("W:
%u\n", i);
udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(device)) {
len = strlen(udev_get_dev_path(udev_device_get_udev(device)));
udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(device)) {
len = strlen(udev_get_dev_path(udev_device_get_udev(device)));
@@
-221,7
+221,7
@@
int udevadm_info(struct udev *udev, int argc, char *argv[])
static const struct option options[] = {
{ "name", required_argument, NULL, 'n' },
{ "path", required_argument, NULL, 'p' },
static const struct option options[] = {
{ "name", required_argument, NULL, 'n' },
{ "path", required_argument, NULL, 'p' },
- { "query",
optional
_argument, NULL, 'q' },
+ { "query",
required
_argument, NULL, 'q' },
{ "attribute-walk", no_argument, NULL, 'a' },
{ "export-db", no_argument, NULL, 'e' },
{ "root", no_argument, NULL, 'r' },
{ "attribute-walk", no_argument, NULL, 'a' },
{ "export-db", no_argument, NULL, 'e' },
{ "root", no_argument, NULL, 'r' },
@@
-254,7
+254,7
@@
int udevadm_info(struct udev *udev, int argc, char *argv[])
int option;
struct stat statbuf;
int option;
struct stat statbuf;
- option = getopt_long(argc, argv, "aed:n:p:q:
:
rxPVh", options, NULL);
+ option = getopt_long(argc, argv, "aed:n:p:q:rxPVh", options, NULL);
if (option == -1)
break;
if (option == -1)
break;
@@
-317,7
+317,7
@@
int udevadm_info(struct udev *udev, int argc, char *argv[])
break;
case 'q':
action = ACTION_QUERY;
break;
case 'q':
action = ACTION_QUERY;
- if (
optarg == NULL ||
strcmp(optarg, "property") == 0 || strcmp(optarg, "env") == 0) {
+ if (strcmp(optarg, "property") == 0 || strcmp(optarg, "env") == 0) {
query = QUERY_PROPERTY;
} else if (strcmp(optarg, "name") == 0) {
query = QUERY_NAME;
query = QUERY_PROPERTY;
} else if (strcmp(optarg, "name") == 0) {
query = QUERY_NAME;