diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-23 05:25:12 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-23 05:25:12 +0000 |
commit | 297fe29fa9f0dc43931069a2bb03c33db043f32a (patch) | |
tree | 1cae70e8360a54f146101b3183ab4a0a4c1a9a68 | |
parent | 62713618f05b61769599c171aecfa1ea9fd931b2 (diff) | |
download | ruby-297fe29fa9f0dc43931069a2bb03c33db043f32a.tar.gz |
* file.c (statfs_fsid): remove statfs.f_fsid because it doesn't return
meaningful value portably. http://togetter.com/li/658517
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | file.c | 17 | ||||
-rw-r--r-- | test/ruby/test_file.rb | 1 |
3 files changed, 5 insertions, 18 deletions
@@ -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 @@ -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 |