From cd950bbf73499bc1517af028cdd1f99e09e45151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Mon, 21 Apr 2008 18:59:23 +0000 Subject: Added comment about get_scaled usage. svn path=/trunk/; revision=2739 --- sysdeps/linux/glibtop_private.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sysdeps/linux/glibtop_private.h') diff --git a/sysdeps/linux/glibtop_private.h b/sysdeps/linux/glibtop_private.h index 8acfa2fa..4c47dc8f 100644 --- a/sysdeps/linux/glibtop_private.h +++ b/sysdeps/linux/glibtop_private.h @@ -61,7 +61,11 @@ skip_line (const char *p) return (char *) (*p ? p+1 : p); } - +/* + * Smart strtoul which handles binary suffixes + * e.g: get_scaled("Size: 32 kB", "Size:") == 32768 + * key can be NULL if there's not prefix to strip (or prefix size is known + */ unsigned long long get_scaled(const char *buffer, const char *key); -- cgit v1.2.1