Feature #8671

support SEEK_DATA and SEEK_HOLE

Added by Masaki Matsushita 9 months ago. Updated 9 months ago.

[ruby-core:56123]
Status:Closed
Priority:Normal
Assignee:Masaki Matsushita
Category:core
Target version:2.1.0

Description

SEEKDATA and SEEKHOLE are whences for lseek(2) supported by Linux since version 3.1.
These are useful to deal with sparse files.
I propose that ruby supports these whences.

patch.diff Magnifier (3.01 KB) Masaki Matsushita, 07/23/2013 06:30 PM

Associated revisions

Revision 42211
Added by glass 9 months ago

  • io.c (interpretseekwhence): support SEEKDATA and SEEKHOLE.
    These are whences for lseek(2) supported by Linux since version 3.1.
    [Feature #8671]

  • test/ruby/test_io.rb: Add tests for above.

History

#1 Updated by Yui NARUSE 9 months ago

  • Description updated (diff)
  • Status changed from Open to Assigned
  • Assignee set to Yukihiro Matsumoto
  • Target version changed from next minor to 2.1.0

It sounds good.
matz, how do you think?

#2 Updated by Motohiro KOSAKI 9 months ago

The patch looks good to me.

#3 Updated by Yukihiro Matsumoto 9 months ago

  • Assignee changed from Yukihiro Matsumoto to Masaki Matsushita

We accept. Go ahead.

Matz.

#4 Updated by Anonymous 9 months ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r42211.
Masaki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • io.c (interpretseekwhence): support SEEKDATA and SEEKHOLE.
    These are whences for lseek(2) supported by Linux since version 3.1.
    [Feature #8671]

  • test/ruby/test_io.rb: Add tests for above.

Also available in: Atom PDF