diff options
Diffstat (limited to 'rrdformat/sniff.go')
-rw-r--r-- | rrdformat/sniff.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rrdformat/sniff.go b/rrdformat/sniff.go index d8b5eb3..a6a8c6d 100644 --- a/rrdformat/sniff.go +++ b/rrdformat/sniff.go @@ -128,5 +128,15 @@ func SniffArchitecture(data []byte) (rrdbinary.Architecture, error) { arch.TimeWidth = arch.LongWidth arch.TimeAlign = arch.LongAlign + // FIXME: Figure out how to sniff the sizeof(short). + // + // javascriptRRD doesn't deal with this at all (it only comes + // up in parsing the params for DST_CDEF). + // + // For now, just assume it's sizeof(long)/2, which is true on + // i686, x86_64, and arm. (It is not true on alpha or ia64.) + arch.ShortWidth = arch.LongWidth / 2 + arch.Shortalign = arch.LongAlign / 2 + return arch, nil } |