mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
8deb635098
Current calculation fails when there are many same type of devices with the testing device, eg sda1 sda2 ... sda10, sda11, sda12 .. $(grep sda1 /proc/partitions) gets multiple numbers. $ grep ram1 /proc/partitions 1 1 10485760 ram1 1 10 10485760 ram10 1 11 10485760 ram11 1 12 10485760 ram12 1 13 10485760 ram13 1 14 10485760 ram14 1 15 10485760 ram15 $ grep -w ram1 /proc/partitions 1 1 10485760 ram1 Fix this by adding the -w option to grep to match the block device exactly. Signed-off-by: Xiong Zhou <xzhou@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>