/[rdesktop]/sourceforge.net/trunk/rdesktop/disk.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/disk.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 652 by astrand, Thu Apr 15 20:42:19 2004 UTC revision 653 by astrand, Thu Apr 15 20:53:32 2004 UTC
# Line 438  disk_query_information(HANDLE handle, ui Line 438  disk_query_information(HANDLE handle, ui
438          // Return requested data          // Return requested data
439          switch (info_class)          switch (info_class)
440          {          {
441                  case 4: /* FileBasicInformation */                  case FileBasicInformation:
442                          seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high,                          seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high,
443                                                         &ft_low);                                                         &ft_low);
444                          out_uint32_le(out, ft_low);     //create_access_time                          out_uint32_le(out, ft_low);     //create_access_time
# Line 459  disk_query_information(HANDLE handle, ui Line 459  disk_query_information(HANDLE handle, ui
459                          out_uint32_le(out, file_attributes);                          out_uint32_le(out, file_attributes);
460                          break;                          break;
461    
462                  case 5: /* FileStandardInformation */                  case FileStandardInformation:
463    
464                          out_uint32_le(out, filestat.st_size);   //Allocation size                          out_uint32_le(out, filestat.st_size);   //Allocation size
465                          out_uint32_le(out, 0);                          out_uint32_le(out, 0);
# Line 470  disk_query_information(HANDLE handle, ui Line 470  disk_query_information(HANDLE handle, ui
470                          out_uint8(out, S_ISDIR(filestat.st_mode) ? 1 : 0);      //Directory                          out_uint8(out, S_ISDIR(filestat.st_mode) ? 1 : 0);      //Directory
471                          break;                          break;
472    
473                  case 35:        /* FileObjectIdInformation */                  case FileObjectIdInformation:
474    
475                          out_uint32_le(out, file_attributes);    /* File Attributes */                          out_uint32_le(out, file_attributes);    /* File Attributes */
476                          out_uint32_le(out, 0);  /* Reparse Tag */                          out_uint32_le(out, 0);  /* Reparse Tag */
# Line 501  disk_set_information(HANDLE handle, uint Line 501  disk_set_information(HANDLE handle, uint
501    
502          switch (info_class)          switch (info_class)
503          {          {
504                  case 4: /* FileBasicInformation */                  case FileBasicInformation:
505                          write_time = change_time = access_time = 0;                          write_time = change_time = access_time = 0;
506    
507                          in_uint8s(in, 4);       /* Handle of root dir? */                          in_uint8s(in, 4);       /* Handle of root dir? */
# Line 581  disk_set_information(HANDLE handle, uint Line 581  disk_set_information(HANDLE handle, uint
581    
582                          break;                          break;
583    
584                  case 10:        /* FileRenameInformation */                  case FileRenameInformation:
585    
586                          in_uint8s(in, 4);       /* Handle of root dir? */                          in_uint8s(in, 4);       /* Handle of root dir? */
587                          in_uint8s(in, 0x1a);    /* unknown */                          in_uint8s(in, 0x1a);    /* unknown */
# Line 607  disk_set_information(HANDLE handle, uint Line 607  disk_set_information(HANDLE handle, uint
607                          }                          }
608                          break;                          break;
609    
610                  case 13:        /* FileDispositionInformation */                  case FileDispositionInformation:
611    
612                          //unimpl("IRP Set File Information class: FileDispositionInformation\n");                          //unimpl("IRP Set File Information class: FileDispositionInformation\n");
613    
# Line 623  disk_set_information(HANDLE handle, uint Line 623  disk_set_information(HANDLE handle, uint
623    
624                          break;                          break;
625    
626                  case 19:        /* FileAllocationInformation */                  case FileAllocationInformation:
627    
628                          unimpl("IRP Set File Information class: FileAllocationInformation\n");                          unimpl("IRP Set File Information class: FileAllocationInformation\n");
629                          break;                          break;
630    
631                  case 20:        /* FileEndOfFileInformation */                  case FileEndOfFileInformation:
632                          in_uint8s(in, 28);      /* unknown */                          in_uint8s(in, 28);      /* unknown */
633                          in_uint32_le(in, length);       /* file size */                          in_uint32_le(in, length);       /* file size */
634    
# Line 736  disk_query_volume_information(HANDLE han Line 736  disk_query_volume_information(HANDLE han
736    
737          switch (info_class)          switch (info_class)
738          {          {
739                  case 1: /* FileFsVolumeInformation */                  case FileFsVolumeInformation:
740    
741                          out_uint32_le(out, 0);  /* volume creation time low */                          out_uint32_le(out, 0);  /* volume creation time low */
742                          out_uint32_le(out, 0);  /* volume creation time high */                          out_uint32_le(out, 0);  /* volume creation time high */
# Line 748  disk_query_volume_information(HANDLE han Line 748  disk_query_volume_information(HANDLE han
748                          rdp_out_unistr(out, fsinfo->label, 2 * strlen(fsinfo->label) - 2);                          rdp_out_unistr(out, fsinfo->label, 2 * strlen(fsinfo->label) - 2);
749                          break;                          break;
750    
751                  case 3: /* FileFsSizeInformation */                  case FileFsSizeInformation:
752    
753                          out_uint32_le(out, stat_fs.f_blocks);   /* Total allocation units low */                          out_uint32_le(out, stat_fs.f_blocks);   /* Total allocation units low */
754                          out_uint32_le(out, 0);  /* Total allocation high units */                          out_uint32_le(out, 0);  /* Total allocation high units */
# Line 758  disk_query_volume_information(HANDLE han Line 758  disk_query_volume_information(HANDLE han
758                          out_uint32_le(out, 0x200);      /* Bytes per sector */                          out_uint32_le(out, 0x200);      /* Bytes per sector */
759                          break;                          break;
760    
761                  case 5: /* FileFsAttributeInformation */                  case FileFsAttributeInformation:
762    
763                          out_uint32_le(out, FS_CASE_SENSITIVE | FS_CASE_IS_PRESERVED);   /* fs attributes */                          out_uint32_le(out, FS_CASE_SENSITIVE | FS_CASE_IS_PRESERVED);   /* fs attributes */
764                          out_uint32_le(out, F_NAMELEN(stat_fs)); /* max length of filename */                          out_uint32_le(out, F_NAMELEN(stat_fs)); /* max length of filename */
# Line 767  disk_query_volume_information(HANDLE han Line 767  disk_query_volume_information(HANDLE han
767                          rdp_out_unistr(out, fsinfo->type, 2 * strlen(fsinfo->type) - 2);                          rdp_out_unistr(out, fsinfo->type, 2 * strlen(fsinfo->type) - 2);
768                          break;                          break;
769    
770                  case 2: /* FileFsLabelInformation */                  case FileFsLabelInformation:
771                  case 4: /* FileFsDeviceInformation */                  case FileFsDeviceInformation:
772                  case 6: /* FileFsControlInformation */                  case FileFsControlInformation:
773                  case 7: /* FileFsFullSizeInformation */                  case FileFsFullSizeInformation:
774                  case 8: /* FileFsObjectIdInformation */                  case FileFsObjectIdInformation:
775                  case 9: /* FileFsMaximumInformation */                  case FileFsMaximumInformation:
776    
777                  default:                  default:
778    
779                          unimpl("IRP Query Volume Information class: 0x%x\n", info_class);                          unimpl("IRP Query Volume Information class: 0x%x\n", info_class);

Legend:
Removed from v.652  
changed lines
  Added in v.653

  ViewVC Help
Powered by ViewVC 1.1.26