Package: scsitools Version: 0.12-2 Followup-For: Bug #624441 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu precise ubuntu-patch
In Debian sid, the attached patch can be applied to achieve the following: * rescan-scsi-bus.patch: Convert usleep invocations to sleep. (Closes: #624441) Thanks for considering the patch. -- System Information: Debian Release: wheezy/sid APT prefers oneiric-updates APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric-proposed'), (500, 'oneiric') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-12-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru scsitools-0.12/debian/patches/rescan-scsi-bus.patch scsitools-0.12/debian/patches/rescan-scsi-bus.patch --- scsitools-0.12/debian/patches/rescan-scsi-bus.patch 2011-01-10 16:53:41.000000000 -0500 +++ scsitools-0.12/debian/patches/rescan-scsi-bus.patch 2011-11-02 21:49:20.000000000 -0400 @@ -2,8 +2,10 @@ Forwarded: no Author: Eric Delaunay <delau...@debian.org> ---- a/rescan-scsi-bus/rescan-scsi-bus.8 -+++ b/rescan-scsi-bus/rescan-scsi-bus.8 +Index: scsitools-0.12/rescan-scsi-bus/rescan-scsi-bus.8 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ scsitools-0.12/rescan-scsi-bus/rescan-scsi-bus.8 2011-11-02 21:48:11.000000000 -0400 @@ -0,0 +1,85 @@ +.\" -*- nroff -*- +.TH RESCAN\-SCSI\-BUS.SH 8 "March 1998" @@ -90,3 +92,34 @@ +.nf +.B http://www.garloff.de/kurt/linux/scsidev/ +.fi +Index: scsitools-0.12/rescan-scsi-bus/rescan-scsi-bus.sh +=================================================================== +--- scsitools-0.12.orig/rescan-scsi-bus/rescan-scsi-bus.sh 2011-11-02 21:49:15.000000000 -0400 ++++ scsitools-0.12/rescan-scsi-bus/rescan-scsi-bus.sh 2011-11-02 21:49:11.000000000 -0400 +@@ -229,7 +229,7 @@ + fi + while test $RC = 2 -o $RC = 6 && test $ctr -le 8; do + if test $RC = 2 -a "$RMB" != "1"; then echo -n "."; let $LN+=1; sleep 1 +- else usleep 20000; fi ++ else sleep 0.02; fi + let ctr+=1 + sg_turs /dev/$SGDEV >/dev/null 2>&1 + RC=$? +@@ -352,7 +352,7 @@ + /sbin/udevadm settle + white_out + else +- usleep 20000 ++ sleep 0.02 + fi + } + +@@ -388,7 +388,7 @@ + fi + # FIXME: Can we skip udevadm settle for removal? + #udevadm_settle +- usleep 20000 ++ sleep 0.02 + else + echo "scsi remove-single-device $devnr" > /proc/scsi/scsi + if test $RC -eq 1 -o $lun -eq 0 ; then