Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions server/data_providers/disk_usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

static VALUE get_disk_usage(VALUE self, VALUE mount_point)
{
char* mount_point_str = RSTRING(mount_point)->ptr;
struct statvfs result;
char* mount_point_str = RSTRING_PTR(mount_point);

VALUE out_hash = rb_hash_new();
rb_hash_aset(out_hash, rb_str_new2("free"), Qnil);
rb_hash_aset(out_hash, rb_str_new2("total"), Qnil);

struct statvfs result;
//struct statvfs result; <-- ISO C90 forbids mixed declarations and code

if(statvfs(mount_point_str, &result) == 0)
{
Expand Down