Deleted Added
full compact
2c2
< * Copyright (c) 2011, Bryan Venteicher <bryanv@daemoninthecloset.org>
---
> * Copyright (c) 2011, Bryan Venteicher <bryanv@FreeBSD.org>
28c28
< __FBSDID("$FreeBSD: head/sys/dev/virtio/virtio.c 241470 2012-10-11 23:41:18Z grehan $");
---
> __FBSDID("$FreeBSD: head/sys/dev/virtio/virtio.c 252707 2013-07-04 17:57:26Z bryanv $");
39d38
< #include <machine/_inttypes.h>
52,53c51,52
< uint16_t devid;
< char *name;
---
> uint16_t devid;
> const char *name;
89a89,108
> static const char *
> virtio_feature_name(uint64_t val, struct virtio_feature_desc *desc)
> {
> int i, j;
> struct virtio_feature_desc *descs[2] = { desc,
> virtio_common_feature_desc };
>
> for (i = 0; i < 2; i++) {
> if (descs[i] == NULL)
> continue;
>
> for (j = 0; descs[i][j].vfd_val != 0; j++) {
> if (val == descs[i][j].vfd_val)
> return (descs[i][j].vfd_str);
> }
> }
>
> return (NULL);
> }
>
92c111
< uint64_t features, struct virtio_feature_desc *feature_desc)
---
> uint64_t features, struct virtio_feature_desc *desc)
101,102c120
< device_printf(dev, "%s features: 0x%"PRIx64"\n", msg,
< features);
---
> device_printf(dev, "%s features: %#jx\n", msg, (uintmax_t) features);
107c125
< sbuf_printf(&sb, "%s features: 0x%"PRIx64, msg, features);
---
> sbuf_printf(&sb, "%s features: %#jx", msg, (uintmax_t) features);
122,124c140
< name = NULL;
< if (feature_desc != NULL)
< name = virtio_feature_name(val, feature_desc);
---
> name = virtio_feature_name(val, desc);
126,130c142
< name = virtio_feature_name(val,
< virtio_common_feature_desc);
<
< if (name == NULL)
< sbuf_printf(&sb, "0x%"PRIx64, val);
---
> sbuf_printf(&sb, "%#jx", (uintmax_t) val);
150,161d161
< static const char *
< virtio_feature_name(uint64_t val, struct virtio_feature_desc *feature_desc)
< {
< int i;
<
< for (i = 0; feature_desc[i].vfd_val != 0; i++)
< if (val == feature_desc[i].vfd_val)
< return (feature_desc[i].vfd_str);
<
< return (NULL);
< }
<
254,255d253
< error = 0;
<
260a259
> error = 0;