Show complete access flag in config view.

This commit is contained in:
Florian Pose 2012-10-09 09:52:50 +02:00
parent ef68a4bff1
commit 77d12c25ca
3 changed files with 11 additions and 4 deletions

View File

@ -1350,6 +1350,7 @@ static int ec_ioctl_config_sdo(
ioctl->size = req->data_size;
memcpy(ioctl->data, req->data,
min((u32) ioctl->size, (u32) EC_MAX_SDO_DATA_SIZE));
ioctl->complete_access = req->complete_access;
up(&master->master_sem);

View File

@ -56,7 +56,7 @@
*
* Increment this when changing the ioctl interface!
*/
#define EC_IOCTL_VERSION_MAGIC 19
#define EC_IOCTL_VERSION_MAGIC 20
// Command-line tool
#define EC_IOCTL_MODULE EC_IOR(0x00, ec_ioctl_module_t)
@ -528,6 +528,7 @@ typedef struct {
uint8_t subindex;
uint32_t size;
uint8_t data[EC_MAX_SDO_DATA_SIZE];
uint8_t complete_access;
} ec_ioctl_config_sdo_t;
/*****************************************************************************/

View File

@ -236,9 +236,14 @@ void CommandConfig::showDetailedConfigs(
cout << indent << " 0x"
<< hex << setfill('0')
<< setw(4) << sdo.index << ":"
<< setw(2) << (unsigned int) sdo.subindex
<< ", " << dec << sdo.size << " byte" << endl;
<< setw(4) << sdo.index;
if (sdo.complete_access) {
cout << " C";
}
else {
cout << ":" << setw(2) << (unsigned int) sdo.subindex;
}
cout << ", " << dec << sdo.size << " byte" << endl;
cout << indent << " " << hex;
for (i = 0; i < min((uint32_t) sdo.size,