[Issue 13754] New: src/std/mmfile.d: MmFile neither has ioctl nor a way to get the fd
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Nov 19 14:48:31 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13754
Issue ID: 13754
Summary: src/std/mmfile.d: MmFile neither has ioctl nor a way
to get the fd
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: danny.milo at gmail.com
std.mmfile.MmFile neither has ioctl nor has a way to get the fileno.
(I'm trying to use it to draw to a framebuffer. The framebuffer physical extent
can be queried using ioctls and the colorspace set, among other things)
Unfortunately the MmFile ctor with the fileno is private. Why?
Fine, there's a public one taking a File (which is... weird - I now have a file
taking a file?).
But then I have to carry around a File and a MmFile everywhere in order to be
able to do ioctls.
I'd suggest:
- add ioctl to MmFile.
- add a way to get the fileno to MmFile
- maybe make MmFile an alternative to File rather than an additional layer -
which it doesn't seem to be anyway. Why the constructor taking a File, then?
I'd not do that...
(ioctl are common in Posix and almost every device supports some)
--
More information about the Digitalmars-d-bugs
mailing list