# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)

# only do anything on block devices which are not removed
ACTION!="add|change", GOTO="cdrom_end"

# /dev/sr, /dev/sr_mod, /dev/srcutree are not valid
KERNEL=="sr|sr_mod|srcutree", GOTO="cdrom_end"

# set CDROM speed
KERNEL=="sr*", RUN+="/sbin/hdparm -E8 /dev/%k"

LABEL="cdrom_end"
