CVS: rdesktop disk.c,1.20,1.21 disk.h,1.1,1.2

Peter ?strand <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19456

Modified Files:
	disk.c disk.h 
Log Message:
Added FILE_INFORMATION_CLASS and FS_INFORMATION_CLASS enums to disk.h. Using these in disk.c, instead of hardcoded numbers

Index: disk.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** disk.c	15 Apr 2004 20:42:19 -0000	1.20
--- disk.c	15 Apr 2004 20:53:32 -0000	1.21
***************
*** 439,443 ****
  	switch (info_class)
  	{
! 		case 4:	/* FileBasicInformation */
  			seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high,
  						       &ft_low);
--- 439,443 ----
  	switch (info_class)
  	{
! 		case FileBasicInformation:
  			seconds_since_1970_to_filetime(get_create_time(&filestat), &ft_high,
  						       &ft_low);
***************
*** 460,464 ****
  			break;
  
! 		case 5:	/* FileStandardInformation */
  
  			out_uint32_le(out, filestat.st_size);	//Allocation size
--- 460,464 ----
  			break;
  
! 		case FileStandardInformation:
  
  			out_uint32_le(out, filestat.st_size);	//Allocation size
***************
*** 471,475 ****
  			break;
  
! 		case 35:	/* FileObjectIdInformation */
  
  			out_uint32_le(out, file_attributes);	/* File Attributes */
--- 471,475 ----
  			break;
  
! 		case FileObjectIdInformation:
  
  			out_uint32_le(out, file_attributes);	/* File Attributes */
***************
*** 502,506 ****
  	switch (info_class)
  	{
! 		case 4:	/* FileBasicInformation */
  			write_time = change_time = access_time = 0;
  
--- 502,506 ----
  	switch (info_class)
  	{
! 		case FileBasicInformation:
  			write_time = change_time = access_time = 0;
  
***************
*** 582,586 ****
  			break;
  
! 		case 10:	/* FileRenameInformation */
  
  			in_uint8s(in, 4);	/* Handle of root dir? */
--- 582,586 ----
  			break;
  
! 		case FileRenameInformation:
  
  			in_uint8s(in, 4);	/* Handle of root dir? */
***************
*** 608,612 ****
  			break;
  
! 		case 13:	/* FileDispositionInformation */
  
  			//unimpl("IRP Set File Information class: FileDispositionInformation\n");
--- 608,612 ----
  			break;
  
! 		case FileDispositionInformation:
  
  			//unimpl("IRP Set File Information class: FileDispositionInformation\n");
***************
*** 624,633 ****
  			break;
  
! 		case 19:	/* FileAllocationInformation */
  
  			unimpl("IRP Set File Information class: FileAllocationInformation\n");
  			break;
  
! 		case 20:	/* FileEndOfFileInformation */
  			in_uint8s(in, 28);	/* unknown */
  			in_uint32_le(in, length);	/* file size */
--- 624,633 ----
  			break;
  
! 		case FileAllocationInformation:
  
  			unimpl("IRP Set File Information class: FileAllocationInformation\n");
  			break;
  
! 		case FileEndOfFileInformation:
  			in_uint8s(in, 28);	/* unknown */
  			in_uint32_le(in, length);	/* file size */
***************
*** 737,741 ****
  	switch (info_class)
  	{
! 		case 1:	/* FileFsVolumeInformation */
  
  			out_uint32_le(out, 0);	/* volume creation time low */
--- 737,741 ----
  	switch (info_class)
  	{
! 		case FileFsVolumeInformation:
  
  			out_uint32_le(out, 0);	/* volume creation time low */
***************
*** 749,753 ****
  			break;
  
! 		case 3:	/* FileFsSizeInformation */
  
  			out_uint32_le(out, stat_fs.f_blocks);	/* Total allocation units low */
--- 749,753 ----
  			break;
  
! 		case FileFsSizeInformation:
  
  			out_uint32_le(out, stat_fs.f_blocks);	/* Total allocation units low */
***************
*** 759,763 ****
  			break;
  
! 		case 5:	/* FileFsAttributeInformation */
  
  			out_uint32_le(out, FS_CASE_SENSITIVE | FS_CASE_IS_PRESERVED);	/* fs attributes */
--- 759,763 ----
  			break;
  
! 		case FileFsAttributeInformation:
  
  			out_uint32_le(out, FS_CASE_SENSITIVE | FS_CASE_IS_PRESERVED);	/* fs attributes */
***************
*** 768,777 ****
  			break;
  
! 		case 2:	/* FileFsLabelInformation */
! 		case 4:	/* FileFsDeviceInformation */
! 		case 6:	/* FileFsControlInformation */
! 		case 7:	/* FileFsFullSizeInformation */
! 		case 8:	/* FileFsObjectIdInformation */
! 		case 9:	/* FileFsMaximumInformation */
  		default:
  
--- 768,778 ----
  			break;
  
! 		case FileFsLabelInformation:
! 		case FileFsDeviceInformation:
! 		case FileFsControlInformation:
! 		case FileFsFullSizeInformation:
! 		case FileFsObjectIdInformation:
! 		case FileFsMaximumInformation:
! 
  		default:
  

Index: disk.h
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** disk.h	15 Apr 2004 20:42:19 -0000	1.1
--- disk.h	15 Apr 2004 20:53:32 -0000	1.2
***************
*** 81,82 ****
--- 81,141 ----
  
  #define	MAX_OPEN_FILES	0x100
+ 
+ typedef enum _FILE_INFORMATION_CLASS
+ {
+ 	FileDirectoryInformation = 1,
+ 	FileFullDirectoryInformation,
+ 	FileBothDirectoryInformation,
+ 	FileBasicInformation,
+ 	FileStandardInformation,
+ 	FileInternalInformation,
+ 	FileEaInformation,
+ 	FileAccessInformation,
+ 	FileNameInformation,
+ 	FileRenameInformation,
+ 	FileLinkInformation,
+ 	FileNamesInformation,
+ 	FileDispositionInformation,
+ 	FilePositionInformation,
+ 	FileFullEaInformation,
+ 	FileModeInformation,
+ 	FileAlignmentInformation,
+ 	FileAllInformation,
+ 	FileAllocationInformation,
+ 	FileEndOfFileInformation,
+ 	FileAlternateNameInformation,
+ 	FileStreamInformation,
+ 	FilePipeInformation,
+ 	FilePipeLocalInformation,
+ 	FilePipeRemoteInformation,
+ 	FileMailslotQueryInformation,
+ 	FileMailslotSetInformation,
+ 	FileCompressionInformation,
+ 	FileObjectIdInformation,
+ 	FileCompletionInformation,
+ 	FileMoveClusterInformation,
+ 	FileQuotaInformation,
+ 	FileReparsePointInformation,
+ 	FileNetworkOpenInformation,
+ 	FileAttributeTagInformation,
+ 	FileTrackingInformation,
+ 	FileIdBothDirectoryInformation,
+ 	FileIdFullDirectoryInformation,
+ 	FileValidDataLengthInformation,
+ 	FileShortNameInformation,
+ 	FileMaximumInformation
+ } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
+ 
+ typedef enum _FSINFOCLASS
+ {
+ 	FileFsVolumeInformation = 1,
+ 	FileFsLabelInformation,
+ 	FileFsSizeInformation,
+ 	FileFsDeviceInformation,
+ 	FileFsAttributeInformation,
+ 	FileFsControlInformation,
+ 	FileFsFullSizeInformation,
+ 	FileFsObjectIdInformation,
+ 	FileFsDriverPathInformation,
+ 	FileFsMaximumInformation
+ } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.