chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: introduce an explicit session class for cronjobs and similar
[elogind.git]
/
src
/
udev
/
udevadm-info.c
diff --git
a/src/udev/udevadm-info.c
b/src/udev/udevadm-info.c
index 907e961f4a777b62a2fc1bc8a24ca4d53c2c58b2..002876594f75a135758811134ff6f73810955041 100644
(file)
--- a/
src/udev/udevadm-info.c
+++ b/
src/udev/udevadm-info.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2004-2009 Kay Sievers <kay
.sievers
@vrfy.org>
+ * Copyright (C) 2004-2009 Kay Sievers <kay@vrfy.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-33,7
+33,7
@@
static bool skip_attribute(const char *name)
{
static bool skip_attribute(const char *name)
{
- static const char
const *
skip[] = {
+ static const char
* const
skip[] = {
"uevent",
"dev",
"modalias",
"uevent",
"dev",
"modalias",
@@
-45,7
+45,7
@@
static bool skip_attribute(const char *name)
unsigned int i;
for (i = 0; i < ELEMENTSOF(skip); i++)
unsigned int i;
for (i = 0; i < ELEMENTSOF(skip); i++)
- if (str
cmp(name, skip[i]) == 0
)
+ if (str
eq(name, skip[i])
)
return true;
return false;
}
return true;
return false;
}
@@
-256,12
+256,6
@@
static void cleanup_db(struct udev *udev)
cleanup_dir(dir, 0, 1);
closedir(dir);
}
cleanup_dir(dir, 0, 1);
closedir(dir);
}
-
- dir = opendir("/run/udev/firmware-missing");
- if (dir != NULL) {
- cleanup_dir(dir, 0, 1);
- closedir(dir);
- }
}
static struct udev_device *find_device(struct udev *udev, const char *id, const char *prefix)
}
static struct udev_device *find_device(struct udev *udev, const char *id, const char *prefix)
@@
-269,7
+263,7
@@
static struct udev_device *find_device(struct udev *udev, const char *id, const
char name[UTIL_PATH_SIZE];
if (prefix && !startswith(id, prefix)) {
char name[UTIL_PATH_SIZE];
if (prefix && !startswith(id, prefix)) {
-
util_
strscpyl(name, sizeof(name), prefix, id, NULL);
+ strscpyl(name, sizeof(name), prefix, id, NULL);
id = name;
}
id = name;
}
@@
-393,15
+387,15
@@
static int uinfo(struct udev *udev, int argc, char *argv[])
break;
case 'q':
action = ACTION_QUERY;
break;
case 'q':
action = ACTION_QUERY;
- if (str
cmp(optarg, "property") == 0 || strcmp(optarg, "env") == 0
) {
+ if (str
eq(optarg, "property") || streq(optarg, "env")
) {
query = QUERY_PROPERTY;
query = QUERY_PROPERTY;
- } else if (str
cmp(optarg, "name") == 0
) {
+ } else if (str
eq(optarg, "name")
) {
query = QUERY_NAME;
query = QUERY_NAME;
- } else if (str
cmp(optarg, "symlink") == 0
) {
+ } else if (str
eq(optarg, "symlink")
) {
query = QUERY_SYMLINK;
query = QUERY_SYMLINK;
- } else if (str
cmp(optarg, "path") == 0
) {
+ } else if (str
eq(optarg, "path")
) {
query = QUERY_PATH;
query = QUERY_PATH;
- } else if (str
cmp(optarg, "all") == 0
) {
+ } else if (str
eq(optarg, "all")
) {
query = QUERY_ALL;
} else {
fprintf(stderr, "unknown query type\n");
query = QUERY_ALL;
} else {
fprintf(stderr, "unknown query type\n");
@@
-414,7
+408,7
@@
static int uinfo(struct udev *udev, int argc, char *argv[])
break;
case 'd':
action = ACTION_DEVICE_ID_FILE;
break;
case 'd':
action = ACTION_DEVICE_ID_FILE;
-
util_
strscpy(name, sizeof(name), optarg);
+ strscpy(name, sizeof(name), optarg);
break;
case 'a':
action = ACTION_ATTRIBUTE_WALK;
break;
case 'a':
action = ACTION_ATTRIBUTE_WALK;