ruby-changes:33608
From: naruse <ko1@a...>
Date: Wed, 23 Apr 2014 14:25:19 +0900 (JST)
Subject: [ruby-changes:33608] naruse:r45689 (trunk): * file.c (statfs_fsid): remove statfs.f_fsid because it doesn't return
naruse 2014-04-23 14:25:12 +0900 (Wed, 23 Apr 2014) New Revision: 45689 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45689 Log: * file.c (statfs_fsid): remove statfs.f_fsid because it doesn't return meaningful value portably. http://togetter.com/li/658517 Modified files: trunk/ChangeLog trunk/file.c trunk/test/ruby/test_file.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 45688) +++ ChangeLog (revision 45689) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Apr 23 14:10:50 2014 NARUSE, Yui <naruse@r...> + + * 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@r...> * ext/stringio/stringio.c (strio_write): use rb_str_append to Index: test/ruby/test_file.rb =================================================================== --- test/ruby/test_file.rb (revision 45688) +++ test/ruby/test_file.rb (revision 45689) @@ -396,7 +396,6 @@ class TestFile < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file.rb#L396 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 Index: file.c =================================================================== --- file.c (revision 45688) +++ file.c (revision 45689) @@ -5529,22 +5529,6 @@ statfs_ffree(VALUE self) https://github.com/ruby/ruby/blob/trunk/file.c#L5529 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) https://github.com/ruby/ruby/blob/trunk/file.c#L6148 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 } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/