chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mac: rename apis with mac_{selinux/smack}_ prefix
[elogind.git]
/
src
/
udev
/
udevadm-info.c
diff --git
a/src/udev/udevadm-info.c
b/src/udev/udevadm-info.c
index 64bb537210d105ab2e8a437551e590008b02d947..22d082601119c06528cdf52cd55671ac7b619310 100644
(file)
--- a/
src/udev/udevadm-info.c
+++ b/
src/udev/udevadm-info.c
@@
-32,8
+32,7
@@
#include "udev.h"
#include "udev-util.h"
#include "udev.h"
#include "udev-util.h"
-static bool skip_attribute(const char *name)
-{
+static bool skip_attribute(const char *name) {
static const char* const skip[] = {
"uevent",
"dev",
static const char* const skip[] = {
"uevent",
"dev",
@@
-51,8
+50,7
@@
static bool skip_attribute(const char *name)
return false;
}
return false;
}
-static void print_all_attributes(struct udev_device *device, const char *key)
-{
+static void print_all_attributes(struct udev_device *device, const char *key) {
struct udev_list_entry *sysattr;
udev_list_entry_foreach(sysattr, udev_device_get_sysattr_list_entry(device)) {
struct udev_list_entry *sysattr;
udev_list_entry_foreach(sysattr, udev_device_get_sysattr_list_entry(device)) {
@@
-84,8
+82,7
@@
static void print_all_attributes(struct udev_device *device, const char *key)
printf("\n");
}
printf("\n");
}
-static int print_device_chain(struct udev_device *device)
-{
+static int print_device_chain(struct udev_device *device) {
struct udev_device *device_parent;
const char *str;
struct udev_device *device_parent;
const char *str;
@@
-130,8
+127,7
@@
static int print_device_chain(struct udev_device *device)
return 0;
}
return 0;
}
-static void print_record(struct udev_device *device)
-{
+static void print_record(struct udev_device *device) {
const char *str;
int i;
struct udev_list_entry *list_entry;
const char *str;
int i;
struct udev_list_entry *list_entry;
@@
-156,8
+152,7
@@
static void print_record(struct udev_device *device)
printf("\n");
}
printf("\n");
}
-static int stat_device(const char *name, bool export, const char *prefix)
-{
+static int stat_device(const char *name, bool export, const char *prefix) {
struct stat statbuf;
if (stat(name, &statbuf) != 0)
struct stat statbuf;
if (stat(name, &statbuf) != 0)
@@
-175,8
+170,7
@@
static int stat_device(const char *name, bool export, const char *prefix)
return 0;
}
return 0;
}
-static int export_devices(struct udev *udev)
-{
+static int export_devices(struct udev *udev) {
struct udev_enumerate *udev_enumerate;
struct udev_list_entry *list_entry;
struct udev_enumerate *udev_enumerate;
struct udev_list_entry *list_entry;
@@
-197,8
+191,7
@@
static int export_devices(struct udev *udev)
return 0;
}
return 0;
}
-static void cleanup_dir(DIR *dir, mode_t mask, int depth)
-{
+static void cleanup_dir(DIR *dir, mode_t mask, int depth) {
struct dirent *dent;
if (depth <= 0)
struct dirent *dent;
if (depth <= 0)
@@
-228,8
+221,7
@@
static void cleanup_dir(DIR *dir, mode_t mask, int depth)
}
}
}
}
-static void cleanup_db(struct udev *udev)
-{
+static void cleanup_db(struct udev *udev) {
DIR *dir;
unlink("/run/udev/queue.bin");
DIR *dir;
unlink("/run/udev/queue.bin");
@@
-265,8
+257,7
@@
static void cleanup_db(struct udev *udev)
}
}
}
}
-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) {
char name[UTIL_PATH_SIZE];
if (prefix && !startswith(id, prefix)) {
char name[UTIL_PATH_SIZE];
if (prefix && !startswith(id, prefix)) {
@@
-295,8
+286,7
@@
static struct udev_device *find_device(struct udev *udev, const char *id, const
return NULL;
}
return NULL;
}
-static int uinfo(struct udev *udev, int argc, char *argv[])
-{
+static int uinfo(struct udev *udev, int argc, char *argv[]) {
_cleanup_udev_device_unref_ struct udev_device *device = NULL;
bool root = 0;
bool export = 0;
_cleanup_udev_device_unref_ struct udev_device *device = NULL;
bool root = 0;
bool export = 0;
@@
-498,8
+488,7
@@
static int uinfo(struct udev *udev, int argc, char *argv[])
print_record(device);
break;
default:
print_record(device);
break;
default:
- fprintf(stderr, "unknown query type\n");
- break;
+ assert_not_reached("unknown query type");
}
break;
case ACTION_ATTRIBUTE_WALK:
}
break;
case ACTION_ATTRIBUTE_WALK: