Opened 9 years ago

Last modified 8 years ago

#314 reopened enhancement

open x: as DASD not a dir

Reported by: KO Myung-Hun Owned by:
Priority: normal Milestone: libc-0.7
Component: libc Version: 0.6.5
Severity: normal Keywords:
Cc:

Description

Hi/2.

open() open x: as a dir. Instead, it would be better to open it as DASD.

Attachments (2)

dasd.diff (3.9 KB) - added by KO Myung-Hun 9 years ago.
patch for dasd open
dasd-v2.diff (5.9 KB) - added by KO Myung-Hun 8 years ago.
v2 patch for dasd open

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by KO Myung-Hun

Attachment: dasd.diff added

patch for dasd open

comment:1 Changed 9 years ago by bird

Resolution: wontfix
Status: newclosed

The current idea of mapping "c:" to what on linux would be something like /dev/sda1 is too risky. An unlucky user with thick fingers may easily get overwhelmed by cat c: or killed by cat d: > c: (if permitted).

I would happily add virtual /dev/something aliases for doing DosOpenL("C:", DASD) without additional open() flags as this requires extra typing, instead of less typing on the user part. If there is a free open flag bit, we could also extend open() to do DASD mode for "drive:" style paths, though I'm not sure there is a free bit and we could just as well add a different API since it requires anyone wanting to use the feature to modify her/his code.

comment:2 Changed 8 years ago by KO Myung-Hun

Resolution: wontfix
Status: closedreopened

It would be good to implement this with /dev/drivex mapping, where x is a, b, c, and so on.

Changed 8 years ago by KO Myung-Hun

Attachment: dasd-v2.diff added

v2 patch for dasd open

comment:3 Changed 8 years ago by KO Myung-Hun

This patch opens a drive in DASD mode if the given name is /dev/driveX style. But its real name will be X:. For example, __libc_Back_ioFHToPath returns X: if a given fd was opened with /dev/driveX.

Note: See TracTickets for help on using tickets.