Check-in [979470b8a8]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.


SHA1 Hash:979470b8a815cfe97a55c94a906671db090850a3
Date: 2013-01-27 01:00:19
User: root
Comment:k3.x change in /proc/partitions messes up optical drive probing, fixed, thanks to 01micko for reporting this problem

Tags And Properties

Changes to woof-code/rootfs-skeleton/sbin/probepart

@@ -18,10 +18,11 @@
 #120601 jemimah: fallback to use 'blkid' to find f.s. type. 120601 revert use of blkid, too slow.
 #120602 kernel 3.2.18 major deviance from earlier kernels, /proc/partitions (and /sys/block) now shows /dev/sr0 when no disk.
 #       new situation, getting duplicate /dev/sr0 so need 'sort -u'.
 #120516 raspi, guess_fstype fails for ext4 and swap f.s., did detect fat. fallback blkid.
 #120516 sort in old coreutils (as in wary/racy) does not have -V option
+#130127 2.x kernels do not have sr0/sr1 in /proc/partitions, 3.x do, which can upset things. (tested and 3.2.29+, so not sure exact version this difference came in)
 . /etc/rc.d/PUPSTATE
 SUNITS="$1" #allowed params are '-k' or '-m'.
@@ -37,11 +38,12 @@
 #devices that have partitions...
 #([^k] is to eliminate mmcblk0 device -- allow mmcblk0p1 etc) v4.01 bugfix eliminate ram...
-PARTITIONS="`grep '^ .*[^k][0-9]$' /proc/partitions | tr -s ' ' | cut -f 4-5 -d ' ' | grep -vE ' loop| ram'`" #each line ex: 16076800 sda5
+#130127 [^kr] screens out sr0-sr9. 2.x kernels do not have these in /proc/partitions, 3.x do, which causes desktop icon to not appear when audio-cd inserted.
+PARTITIONS="`grep '^ .*[^kr][0-9]$' /proc/partitions | tr -s ' ' | cut -f 4-5 -d ' ' | grep -vE ' loop| ram'`" #each line ex: 16076800 sda5
 PARTNAMES="`echo "$PARTITIONS" | cut -f 2 -d ' '`" #120602
 #all disk devices...
 #note, /proc/diskstats only updated when a disk accessed, so devs may be missing...
 #NO, NO, NO, /sys is very flakey for hd devices...