aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/include/uhd/types/dict.hpp2
-rwxr-xr-xhost/utils/usrp2_card_burner.py10
2 files changed, 5 insertions, 7 deletions
diff --git a/host/include/uhd/types/dict.hpp b/host/include/uhd/types/dict.hpp
index b5fb11120..50a2b5c3b 100644
--- a/host/include/uhd/types/dict.hpp
+++ b/host/include/uhd/types/dict.hpp
@@ -46,7 +46,7 @@ namespace uhd{
* \param first the begin iterator
* \param last the end iterator
*/
- template <class InputIterator>
+ template <typename InputIterator>
dict(InputIterator first, InputIterator last){
for(InputIterator it = first; it != last; it++){
_map.push_back(*it);
diff --git a/host/utils/usrp2_card_burner.py b/host/utils/usrp2_card_burner.py
index 59d0b3231..c39fb9d19 100755
--- a/host/utils/usrp2_card_burner.py
+++ b/host/utils/usrp2_card_burner.py
@@ -92,7 +92,7 @@ def get_raw_device_hints():
return sorted(set(volumes))
####################################################################
- # Platform Linux: call blockdev on all the dev0 devices
+ # Platform Linux: parse procfs /proc/partitions
####################################################################
if platform.system() == 'Linux':
devs = list()
@@ -101,12 +101,10 @@ def get_raw_device_hints():
for line in output.splitlines():
try:
major, minor, blocks, name = line.split()
- if name[-1].isdigit(): assert int(minor) == 0
- dev = os.path.join('/dev/', name)
- size = int(command('blockdev', '--getsz', dev))*512
- assert size <= MAX_SD_CARD_SIZE
+ assert not name[-1].isdigit() or int(minor) == 0
+ assert int(blocks)*1024 <= MAX_SD_CARD_SIZE
except: continue
- devs.append(dev)
+ devs.append(os.path.join('/dev', name))
return sorted(set(devs))