Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
string_helpers.c File Reference
#include <linux/kernel.h>
#include <linux/math64.h>
#include <linux/export.h>
#include <linux/string_helpers.h>

Go to the source code of this file.

Functions

int string_get_size (u64 size, const enum string_size_units units, char *buf, int len)
 
 EXPORT_SYMBOL (string_get_size)
 

Function Documentation

EXPORT_SYMBOL ( string_get_size  )
int string_get_size ( u64  size,
const enum string_size_units  units,
char buf,
int  len 
)

string_get_size - get the size in the specified units : The size to be converted : units to use (powers of 1000 or 1024) : buffer to format to : length of buffer

This function returns a string formatted to 3 significant figures giving the size in the required units. Returns 0 on success or error on failure. is always zero terminated.

Definition at line 23 of file string_helpers.c.