Subversion Repositories SvarDOS

Rev

Rev 2053 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2053 Rev 2054
Line 208... Line 208...
208
*/
208
*/
209
 
209
 
210
/* returns zero on failure, if lpRootPathName is NULL or "" we use current
210
/* returns zero on failure, if lpRootPathName is NULL or "" we use current
211
 * default drive. */
211
 * default drive. */
212
int GetVolumeInformation(const char *lpRootPathName, char *lpVolumeNameBuffer,
212
int GetVolumeInformation(const char *lpRootPathName, char *lpVolumeNameBuffer,
213
  DWORD nVolumeNameSize, DWORD *lpVolumeSerialNumber) {
213
  size_t nVolumeNameSize, unsigned long *lpVolumeSerialNumber) {
214
 
214
 
215
  /* Using DOS interrupt to get serial number */
215
  /* Using DOS interrupt to get serial number */
216
  struct media_info {
216
  struct media_info {
217
    short dummy;
217
    short dummy;
218
    DWORD serial;
218
    unsigned long serial;
219
    char volume[11];
219
    char volume[11];
220
    short ftype[8];
220
    short ftype[8];
221
  } media;
221
  } media;
222
 
222
 
223
  /* Stores the root path we use. */
223
  /* Stores the root path we use. */
Line 396... Line 396...
396
  }
396
  }
397
}
397
}
398
 
398
 
399
 
399
 
400
/* retrieve attributes (ReadOnly/System/...) about file or directory
400
/* retrieve attributes (ReadOnly/System/...) about file or directory
401
 * returns (DWORD)-1 on error
401
 * returns -1 on error
402
 */
402
 */
403
int GetFileAttributes(unsigned short *attr, const char *pathname) {
403
int GetFileAttributes(unsigned short *attr, const char *pathname) {
404
  union REGS r;
404
  union REGS r;
405
  struct SREGS s;
405
  struct SREGS s;
406
  char buffer[260];
406
  char buffer[260];