X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=snmp%2Flustre-snmp-util.c;h=93908a13e24be07783d6e45d6d6db89d07483746;hp=2dcfc8cdc7af3c64e390746f627d89a274f2d665;hb=c944e6eaa7f8b98230701266641bfd9dfcb56da8;hpb=0f8dca08a4f68cba82c2c822998ecc309d3b7aaf diff --git a/snmp/lustre-snmp-util.c b/snmp/lustre-snmp-util.c index 2dcfc8c..93908a1 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); +} +