X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=snmp%2Flustre-snmp-util.c;h=70d5ecd69e7ef66bc69d43f05d0d751624b1b46b;hp=2dcfc8cdc7af3c64e390746f627d89a274f2d665;hb=31197e43bca94d9fbb4ca2090b556d93c6c18542;hpb=0f8dca08a4f68cba82c2c822998ecc309d3b7aaf diff --git a/snmp/lustre-snmp-util.c b/snmp/lustre-snmp-util.c index 2dcfc8c..70d5ecd 100644 --- a/snmp/lustre-snmp-util.c +++ b/snmp/lustre-snmp-util.c @@ -1,6 +1,4 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * +/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -765,3 +763,12 @@ extern int mds_stats_values(char * name_value, unsigned long long * nb_sample, u return SUCCESS; } + +void convert_ull(counter64 *c64, unsigned long long ull, size_t *var_len) +{ + *var_len = sizeof(*c64); + c64->low = (unsigned long long) (0x0ffffffff & ull); + ull >>= 32; + c64->high = (unsigned long long) (0x0ffffffff & ull); +} +