Changeset 5f0fe4e9 in mainline for uspace/drv/usbmast/main.c


Ignore:
Timestamp:
2011-05-11T19:37:16Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c372e03
Parents:
cf002dbf
Message:

Mass storage (small) refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbmast/main.c

    rcf002dbf r5f0fe4e9  
    107107            (size_t) dev->pipes[BULK_OUT_EP].descriptor->max_packet_size);
    108108
    109         int lun_count = usb_massstor_get_max_lun(dev);
    110         /* Return value:
    111          * rc < 0 => device does not know this request, only single LUN
    112          *     could be present
    113          * rc >= 0 - the rc is the maximum LUN, thus count is +1
    114          */
    115         if (lun_count < 0) {
    116                 lun_count = 1;
    117         } else {
    118                 lun_count++;
    119         }
     109        size_t lun_count = usb_masstor_get_lun_count(dev);
    120110
    121111        usb_massstor_inquiry_result_t inquiry;
     
    127117        }
    128118
    129         usb_log_info("Mass storage `%s': `%s' by `%s' is %s (%s), %d LUN(s).\n",
     119        usb_log_info("Mass storage `%s': " \
     120            "`%s' by `%s' is %s (%s), %zu LUN(s).\n",
    130121            dev->ddf_dev->name,
    131122            inquiry.product_and_revision, inquiry.vendor_id,
Note: See TracChangeset for help on using the changeset viewer.