rol@grasp1.univ-lyon1.fr (Paul Rolland) (04/17/91)
Hi Networkers, Another question about OS/2, HPFS and the OS/2 calls to file function. In my previous message, I told that I couldn't access a file on an HPFS disk with the C/2 open and fopen functions. So, I used the OS/2 call DosOpen. And then, suprise. I thought HPFS could handle long file name... So, I tried to DosOpen the file ROUTETABLE.DATA, but it fails, returning me the error 206 (FILENAME_EXCED_RANGE). So, I had to reduce it to ROUTE.TAB, without changing anything else... and it works ! But my manual tells me that : 'the High Performance File System (HPFS) permits having many parts in a name if each part is separated by a period.' and 'Generally, long file names support 255 characters per name part; the HPFS names support 254.' [from IBM Operating System Extended Edition Version 1.2 User's Guide Volume 1: Base Operating System] My question is : WHY ? Why can't I access a file that is fully supported by the file system ? Paul. Paul Rolland, engineer [I hope :)] in July 91, Specialist of assembly on PC [Not too bad in fact :)], Trying to progress on Unix administration Email : rol@grasp1.univ-lyon1.fr
Ramesh_Rama_Pendakur@cup.portal.com (04/17/91)
I don't know about your version of the Operating System, but in OS/2 1.3 the better way would be to use DosOpen2. As for C Run-time support, it might use the old version of DosOpen. Just a wild guess. Try it anyway. Post the results if you would. - ... -
ballard@cheddar.ucs.ubc.ca (Alan Ballard) (04/17/91)
In article <41343@cup.portal.com> Ramesh_Rama_Pendakur@cup.portal.com writes: >the better way would be to use DosOpen2. As for C Run-time support, it >might use the old version of DosOpen. Whether you use fopen , DosOpen, or DosOpen2 isn't relevent. Whether the program is long-name-aware or not is what matters. (Time for a FAQ list for this group, maybe.) Alan Ballard | Internet: ballard@ucs.ubc.ca University Computing Services | Bitnet: USERAB1@UBCMTSG University of British Columbia | Phone: 604-822-3074 Vancouver B.C. Canada V6R 1Z2 | Fax: 604-822-5116
d9mikael@dtek.chalmers.se (Mikael Wahlgren) (04/18/91)
In article <41343@cup.portal.com> Ramesh_Rama_Pendakur@cup.portal.com writes: >I don't know about your version of the Operating System, but in OS/2 1.3 >the better way would be to use DosOpen2. As for C Run-time support, it >might use the old version of DosOpen. >Just a wild guess. Try it anyway. Post the results if you would. This is dead WRONG, and so it was a couple of weeks ago when someone told the same thing. The -2 calls (like DosOpen2) are NOT for HPFS support, but for Extended Attribute linking. The "old" API's fully support the HPFS long filenames, and the only thing you have to do is to use the DosOpen call and set the NEWFILES flag in your EXE-header. If you use a C-function for opening a file (like fopen), this should also be OK with HPFS long filenames, but you have to check that the library reserves enough space for your filename. Mikael Wahlgren d9mikael@dtek.chalmers.se