master/domain.c
changeset 315 119f967aead8
parent 294 feea8d850c65
child 325 7833cf70c4f2
equal deleted inserted replaced
314:26023e414f5c 315:119f967aead8
    51 
    51 
    52 /*****************************************************************************/
    52 /*****************************************************************************/
    53 
    53 
    54 /** \cond */
    54 /** \cond */
    55 
    55 
    56 EC_SYSFS_READ_ATTR(data_size);
    56 EC_SYSFS_READ_ATTR(image_size);
    57 
    57 
    58 static struct attribute *def_attrs[] = {
    58 static struct attribute *def_attrs[] = {
    59     &attr_data_size,
    59     &attr_image_size,
    60     NULL,
    60     NULL,
    61 };
    61 };
    62 
    62 
    63 static struct sysfs_ops sysfs_ops = {
    63 static struct sysfs_ops sysfs_ops = {
    64     .show = &ec_show_domain_attribute,
    64     .show = &ec_show_domain_attribute,
   343                                  char *buffer /**< memory to store data in */
   343                                  char *buffer /**< memory to store data in */
   344                                  )
   344                                  )
   345 {
   345 {
   346     ec_domain_t *domain = container_of(kobj, ec_domain_t, kobj);
   346     ec_domain_t *domain = container_of(kobj, ec_domain_t, kobj);
   347 
   347 
   348     if (attr == &attr_data_size) {
   348     if (attr == &attr_image_size) {
   349         return sprintf(buffer, "%i\n", domain->data_size);
   349         return sprintf(buffer, "%i\n", domain->data_size);
   350     }
   350     }
   351 
   351 
   352     return 0;
   352     return 0;
   353 }
   353 }