CVS: rdesktop disk.c,1.22,1.23

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-serv25752

Modified Files:
	disk.c 
Log Message:
FileEndOfFileInformation actually calls ftrunc().
FileAllocationInformation falls through to FileEndOfFileInformation.


Index: disk.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** disk.c	16 Apr 2004 11:37:24 -0000	1.22
--- disk.c	16 Apr 2004 13:03:13 -0000	1.23
***************
*** 639,645 ****
  
  		case FileAllocationInformation:
! 
! 			unimpl("IRP Set File Information class: FileAllocationInformation\n");
! 			break;
  
  		case FileEndOfFileInformation:
--- 639,647 ----
  
  		case FileAllocationInformation:
! 			/* Fall through to FileEndOfFileInformation,
! 			   which uses ftrunc. This is like Samba with
! 			   "strict allocation = false", and means that
! 			   we won't detect out-of-quota errors, for
! 			   example. */
  
  		case FileEndOfFileInformation:
***************
*** 652,658 ****
  					return STATUS_DISK_FULL;
  
! 			//printf("FileEndOfFileInformation length = %d\n", length);
! 			// ????????????
! 			//unimpl("IRP Set File Information class: FileEndOfFileInformation\n");
  			break;
  		default:
--- 654,663 ----
  					return STATUS_DISK_FULL;
  
! 			if (ftruncate(handle, length) != 0)
! 			{
! 				perror("ftruncate");
! 				return STATUS_DISK_FULL;
! 			}
! 
  			break;
  		default:



-------------------------------------------------------
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.