ENV{DM_STATE}=="SUSPENDED", GOTO="device_mapper_end"
ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end"
-IMPORT{program}="vol_id --export $tempnode"
+IMPORT{program}="vol_id --export $tempnode"
OPTIONS="link_priority=-100"
ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS="link_priority=-90"
-
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
}
media = strdup(mediabuf);
- info("selinux_get_media(%s)='%s'\n", devname, media);
+ info("selinux_get_media(%s)='%s'", devname, media);
close_out:
fclose(fp);
if (ret < 0)
if (matchpathcon(file, mode, &scontext) < 0) {
- err("matchpathcon(%s) failed\n", file);
+ err("matchpathcon(%s) failed", file);
return;
}
if (ret < 0)
if (matchpathcon(file, mode, &scontext) < 0) {
- err("matchpathcon(%s) failed\n", file);
+ err("matchpathcon(%s) failed", file);
return;
}
*/
if (is_selinux_running()) {
if (!udev_root[0])
- err("selinux_init: udev_root not set\n");
+ err("selinux_init: udev_root not set");
matchpathcon_init_prefix(NULL, udev_root);
if (getfscreatecon(&prev_scontext) < 0) {
- err("getfscreatecon failed\n");
+ err("getfscreatecon failed");
prev_scontext = NULL;
}
}
pos--;
pos[0] = '\0';
- dbg("stat '%s'\n", p);
+ dbg("stat '%s'", p);
if (stat(p, &stats) == 0 && (stats.st_mode & S_IFMT) == S_IFDIR)
return 0;
if (create_path (p) != 0)
return -1;
- dbg("mkdir '%s'\n", p);
+ dbg("mkdir '%s'", p);
if (mkdir(p, 0755) == 0)
return 0;
if (errno == EEXIST)
selinux_init();
dbg("version %s", UDEV_VERSION);
- /* parse commandline options */
while (1) {
option = getopt_long(argc, argv, "dtvhV", options, NULL);
if (option == -1)
goto exit;
}
- /* get command line options */
while (1) {
option = getopt_long(argc, argv, "aen:p:q:rVh", options, NULL);
if (option == -1)
strlcpy(name, &optarg[strlen(udev_root)+1], sizeof(name));
else
strlcpy(name, optarg, sizeof(name));
- dbg("name: %s\n", name);
+ dbg("name: %s", name);
break;
case 'p':
/* remove /sys if given */
strlcpy(path, &optarg[strlen(sysfs_path)], sizeof(path));
else
strlcpy(path, optarg, sizeof(path));
- dbg("path: %s\n", path);
+ dbg("path: %s", path);
break;
case 'q':
- dbg("udev query: %s\n", optarg);
action = ACTION_QUERY;
if (strcmp(optarg, "name") == 0) {
query = QUERY_NAME;
struct device *new_device;
const char *devpath = &path[strlen(sysfs_path)];
- dbg("insert: '%s'\n", devpath);
+ dbg("insert: '%s'", devpath);
list_for_each_entry(loop_device, device_list, node) {
if (strcmp(loop_device->path, devpath) > 0) {
va_start(args, format);
vprintf(format, args);
va_end(args);
- if (format[strlen(format)-1] != '\n')
- printf("\n");
+ printf("\n");
}
#endif
fd = open(filename, O_WRONLY);
if (fd < 0) {
- dbg("error on opening %s: %s\n", filename, strerror(errno));
+ dbg("error on opening %s: %s", filename, strerror(errno));
return;
}
if (write(fd, "add", 3) < 0)
- info("error on triggering %s: %s\n", filename, strerror(errno));
+ info("error on triggering %s: %s", filename, strerror(errno));
close(fd);
}