diff options
author | Chih-Wei Huang <cwhuang@linux.org.tw> | 2010-11-17 18:53:09 +0800 |
---|---|---|
committer | Chih-Wei Huang <cwhuang@linux.org.tw> | 2010-11-17 18:53:09 +0800 |
commit | def8f3168305cc57803f1e9aafd8ed6d8e93067d (patch) | |
tree | ed447571e1598f814c149cd35eb4c8fd6f436eae /DirectVolume.cpp | |
parent | 64382de1f93b84ca59f607da4b4fdbd77f1af67d (diff) | |
download | system_vold-def8f3168305cc57803f1e9aafd8ed6d8e93067d.tar.gz system_vold-def8f3168305cc57803f1e9aafd8ed6d8e93067d.tar.bz2 system_vold-def8f3168305cc57803f1e9aafd8ed6d8e93067d.zip |
vold: fix an offset one bug that makes partition 4 unusable
Change-Id: Ic8e18e6191ad7ee33162e36060b57a6802cf0883
Diffstat (limited to 'DirectVolume.cpp')
-rw-r--r-- | DirectVolume.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/DirectVolume.cpp b/DirectVolume.cpp index 02c83d1..0d781d0 100644 --- a/DirectVolume.cpp +++ b/DirectVolume.cpp @@ -189,8 +189,8 @@ void DirectVolume::handlePartitionAdded(const char *devpath, NetlinkEvent *evt) #ifdef PARTITION_DEBUG SLOGD("Dv:partAdd: part_num = %d, minor = %d\n", part_num, minor); #endif - if (part_num >= MAX_PARTITIONS) { - SLOGE("Dv:partAdd: ignoring part_num = %d (max: %d)\n", part_num, MAX_PARTITIONS-1); + if (part_num > MAX_PARTITIONS) { + SLOGE("Dv:partAdd: ignoring part_num = %d (max: %d)\n", part_num, MAX_PARTITIONS); } else { mPartMinors[part_num -1] = minor; } |