Changeset 5f0fe4e9 in mainline for uspace/drv/usbmast/mast.c
- Timestamp:
- 2011-05-11T19:37:16Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c372e03
- Parents:
- cf002dbf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbmast/mast.c
rcf002dbf r5f0fe4e9 173 173 /** Get max LUN of a mass storage device. 174 174 * 175 * @see usb_masstor_get_lun_count 176 * 175 177 * @warning Error from this command does not necessarily indicate malfunction 176 178 * of the device. Device does not need to support this request. 179 * You shall rather use usb_masstor_get_lun_count. 177 180 * 178 181 * @param dev Mass storage device. … … 195 198 } 196 199 200 /** Get number of LUNs supported by mass storage device. 201 * 202 * @warning This function hides any error during the request 203 * (typically that shall not be a problem). 204 * 205 * @param dev Mass storage device. 206 * @return Number of LUNs. 207 */ 208 size_t usb_masstor_get_lun_count(usb_device_t *dev) 209 { 210 int max_lun = usb_massstor_get_max_lun(dev); 211 if (max_lun < 0) { 212 max_lun = 1; 213 } else { 214 max_lun++; 215 } 216 217 return (size_t) max_lun; 218 } 219 197 220 /** 198 221 * @}
Note:
See TracChangeset
for help on using the changeset viewer.