void-packages/srcpkgs/pulseaudio/patches/udev-183.patch

50 lines
2 KiB
Diff
Raw Normal View History

--- src/modules/module-udev-detect.c.orig 2012-05-26 16:17:59.213118773 +0200
+++ src/modules/module-udev-detect.c 2012-05-26 16:18:37.259226386 +0200
@@ -123,7 +123,7 @@ static char *card_get_sysattr(const char
goto finish;
}
- t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx);
+ t = pa_sprintf_malloc("%s/class/sound/card%s", "/sys", card_idx);
card = udev_device_new_from_syspath(udev, t);
pa_xfree(t);
@@ -282,7 +282,7 @@ static void verify_access(struct userdat
pa_assert(u);
pa_assert(d);
- cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u->udev), path_get_card_id(d->path));
+ cd = pa_sprintf_malloc("%s/snd/controlC%s", "/dev", path_get_card_id(d->path));
accessible = access(cd, R_OK|W_OK) >= 0;
pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible));
@@ -632,7 +632,7 @@ static int setup_inotify(struct userdata
return -1;
}
- dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u->udev));
+ dev_snd = pa_sprintf_malloc("%s/snd", "/dev");
r = inotify_add_watch(u->inotify_fd, dev_snd, IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);
pa_xfree(dev_snd);
--- src/modules/udev-util.c.orig 2012-05-26 16:20:06.106142401 +0200
+++ src/modules/udev-util.c 2012-05-26 16:20:29.688589253 +0200
@@ -180,7 +180,7 @@ int pa_udev_get_info(int card_idx, pa_pr
goto finish;
}
- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);
+ t = pa_sprintf_malloc("%s/class/sound/card%i", "/sys", card_idx);
card = udev_device_new_from_syspath(udev, t);
pa_xfree(t);
@@ -277,7 +277,7 @@ char* pa_udev_get_property(int card_idx,
goto finish;
}
- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);
+ t = pa_sprintf_malloc("%s/class/sound/card%i", "/sys", card_idx);
card = udev_device_new_from_syspath(udev, t);
pa_xfree(t);