Changeset 46ec2c06 in mainline for pci/libpci/access.c


Ignore:
Timestamp:
2006-05-11T16:08:50Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7981e3cc
Parents:
20a9b85
Message:

SYS_AS_AREA_DESTROY support for uspace.

Formatting fixes in libpci.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pci/libpci/access.c

    r20a9b85 r46ec2c06  
    2626        int i;
    2727
     28        if (!a)
     29                return NULL;
     30               
    2831        bzero(a, sizeof(*a));
    2932        for (i = 0; i < PCI_ACCESS_MAX; i++)
     
    3841
    3942        if (!x)
    40                 a->error("Out of memory (allocation of %d bytes failed)",
    41                          size);
     43                a->error("Out of memory (allocation of %d bytes failed)", size);
    4244        return x;
    4345}
     
    219221{
    220222        if (pos & (len - 1))
    221                 d->access->error("Unaligned write: pos=%02x,len=%d", pos,
    222                                  len);
     223                d->access->error("Unaligned write: pos=%02x,len=%d", pos, len);
    223224        if (pos + len <= d->cache_len)
    224225                memcpy(d->cache + pos, buf, len);
     
    246247{
    247248        if (pos < d->cache_len) {
    248                 int l =
    249                     (pos + len >=
    250                      d->cache_len) ? (d->cache_len - pos) : len;
     249                int l = (pos + len >= d->cache_len) ? (d->cache_len - pos) : len;
    251250                memcpy(d->cache + pos, buf, l);
    252251        }
     
    261260        }
    262261        if (flags & ~d->known_fields)
    263                 d->known_fields |=
    264                     d->methods->fill_info(d, flags & ~d->known_fields);
     262                d->known_fields |= d->methods->fill_info(d, flags & ~d->known_fields);
    265263        return d->known_fields;
    266264}
Note: See TracChangeset for help on using the changeset viewer.