diff options
author | Araq <rumpf_a@web.de> | 2014-09-19 00:54:01 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-09-19 00:54:01 +0200 |
commit | d4bc11b654384ffbccef8b2f549513f2c5a8fdc0 (patch) | |
tree | 930d1e0c56c0bfe71138a5f1d87be977e4ec4b2c /lib/impure/osinfo_posix.nim | |
parent | 4367fb26adf3111aac8a9b4078c0126a8e215077 (diff) | |
download | Nim-d4bc11b654384ffbccef8b2f549513f2c5a8fdc0.tar.gz |
cleaned up various modules
Diffstat (limited to 'lib/impure/osinfo_posix.nim')
-rw-r--r-- | lib/impure/osinfo_posix.nim | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/lib/impure/osinfo_posix.nim b/lib/impure/osinfo_posix.nim index 4fde82012..1baff8c55 100644 --- a/lib/impure/osinfo_posix.nim +++ b/lib/impure/osinfo_posix.nim @@ -1,20 +1,21 @@ import posix, strutils, os -type - Tstatfs {.importc: "struct statfs64", - header: "<sys/statfs.h>", final, pure.} = object - f_type: int - f_bsize: int - f_blocks: int - f_bfree: int - f_bavail: int - f_files: int - f_ffree: int - f_fsid: int - f_namelen: int +when false: + type + Tstatfs {.importc: "struct statfs64", + header: "<sys/statfs.h>", final, pure.} = object + f_type: int + f_bsize: int + f_blocks: int + f_bfree: int + f_bavail: int + f_files: int + f_ffree: int + f_fsid: int + f_namelen: int -proc statfs(path: string, buf: var Tstatfs): int {. - importc, header: "<sys/vfs.h>".} + proc statfs(path: string, buf: var Tstatfs): int {. + importc, header: "<sys/vfs.h>".} proc getSystemVersion*(): string = @@ -23,7 +24,7 @@ proc getSystemVersion*(): string = var unix_info: TUtsname if uname(unix_info) != 0: - os.OSError() + os.raiseOSError(osLastError()) if $unix_info.sysname == "Linux": # Linux |