lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200610242213.56149.arnd@arndb.de>
Date:	Tue, 24 Oct 2006 22:13:55 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Michael Holzheu <HOLZHEU@...ibm.com>
Cc:	Ingo Oeser <ioe-lkml@...eria.de>, linux-kernel@...r.kernel.org,
	mschwid2@...ibm.com
Subject: Re: How to document dimension units for virtual files?

On Tuesday 24 October 2006 16:15, Michael Holzheu wrote:
> If you want to export data to userspace via virtual filesystems
> like procfs, sysfs, debugfs etc., the following rules are recommended:
>
> - Export only one value in one virtual file.
> - Data format should be as simple as possible.
> - Use ASCII formated strings, no binary data if possible.
> - If data has dimension units, encode that in the filename.
>   Please use the following suffixes:
>   * kb: Kilobytes
>   * mb: Megabytes
>   * ms: Milliseconds
>   * us: Microseconds
>   * ns: Nanoseconds
>   * ...

For larger units like kb or mb, why bother at all?
You can just make that a 64 bit number and give an exact value.
You should also be sure to use a correct unit, i.e.
KiB for 1024 bytes and kB for 1000 bytes.

	Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ