diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-04-13 20:01:27 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-04-13 20:01:27 +0200 |
commit | b5eac3af41cb8c752b6779dd36c314f8f6caeccf (patch) | |
tree | 339d0579670851e3ba22a5a0bb642b2b9f75724f | |
parent | f44f8881c89fcb2e6e59a64dd1401cc8097d1306 (diff) | |
download | pcitool-b5eac3af41cb8c752b6779dd36c314f8f6caeccf.tar.gz pcitool-b5eac3af41cb8c752b6779dd36c314f8f6caeccf.tar.bz2 pcitool-b5eac3af41cb8c752b6779dd36c314f8f6caeccf.tar.xz pcitool-b5eac3af41cb8c752b6779dd36c314f8f6caeccf.zip |
Really fix setting registers with access mode equal to 32 (size of pcilib_register_value_t)
-rw-r--r-- | pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -604,8 +604,8 @@ int pcilib_write_register_by_id(pcilib_t *ctx, pcilib_register_t reg, pcilib_reg pcilib_error("Big-endian byte order support is not implemented"); return PCILIB_ERROR_NOTSUPPORTED; } else { - if (b->access == sizeof(res) * 8) { - buf[i] = res; + if (b->access == sizeof(pcilib_register_value_t) * 8) { + buf[0] = value; } else { for (i = 0, res = value; (res > 0)&&(i <= n); ++i) { buf[i] = res & BIT_MASK(b->access); |