summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--file.c17
-rw-r--r--test/ruby/test_file.rb1
3 files changed, 5 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index ddbaa7e7d7..c712a64573 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 23 14:10:50 2014 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * file.c (statfs_fsid): remove statfs.f_fsid because it doesn't return
+ meaningful value portably. http://togetter.com/li/658517
+
Wed Apr 23 11:03:41 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/stringio/stringio.c (strio_write): use rb_str_append to
diff --git a/file.c b/file.c
index 53c65aaa9c..c63462e783 100644
--- a/file.c
+++ b/file.c
@@ -5529,22 +5529,6 @@ statfs_ffree(VALUE self)
return LL2NUM(get_statfs(self)->f_ffree);
}
-/*
- * call-seq:
- * st.fsid -> integer
- *
- * Returns filesystem id.
- *
- */
-
-static VALUE
-statfs_fsid(VALUE self)
-{
- return rb_integer_unpack(&get_statfs(self)->f_fsid,
- 1, sizeof(get_statfs(self)->f_fsid),
- 0, INTEGER_PACK_2COMP|INTEGER_PACK_NATIVE_BYTE_ORDER);
-}
-
#ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME
/*
* call-seq:
@@ -6164,7 +6148,6 @@ Init_File(void)
rb_define_method(rb_cStatfs, "bavail", statfs_bavail, 0);
rb_define_method(rb_cStatfs, "files", statfs_files, 0);
rb_define_method(rb_cStatfs, "ffree", statfs_ffree, 0);
- rb_define_method(rb_cStatfs, "fsid", statfs_fsid, 0);
rb_define_method(rb_cStatfs, "fstypename", statfs_fstypename, 0);
#endif
}
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 77be3237c3..2d8c86251f 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -396,7 +396,6 @@ class TestFile < Test::Unit::TestCase
assert_kind_of Integer, st.bavail
assert_kind_of Integer, st.files
assert_kind_of Integer, st.ffree
- assert_kind_of Integer, st.fsid
begin
assert_kind_of String, st.fstypename
rescue NotImplementedError