Yes the code assumes the first reported storage is internal and the next is external, the *vast* majority of devices obey that assumption. It cant use name since that's a free form text field that can contain anything. And type doesn't imply anything about the storage being internal or SD card. Many devices actually implement their internal storage as removable ram. That said it could be possible to swap the drives in the case when the first one marked as removable and the second one as fixed. However, that's not really a general fix.
Oh and incidentally, it's not which is reported first, its which is given a lower id number.
Last edited by kovidgoyal; 01-16-2025 at 01:57 AM.
|