delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/18/18:21:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-ID: <16072.1853.537466.786053@gargle.gargle.HOWL>
Date: Sun, 18 May 2003 15:20:45 -0700
From: Martin Buchholz <martin AT xemacs DOT org>
To: cygwin AT cygwin DOT com
Subject: SPARSE files considered harmful - please revert
Reply-To: martin AT xemacs DOT org

cygwin-patches wants me to be a subscriber to post a patch, but I'm
not ready to become a regular contributor (yet) and you'll likely want
to make this change in a different way, so I'm posting my (obvious)
patch here instead of cygwin-patches.

--------- Message bounced from cygwin-patches follows. -----------

I expect that you can do a better job of undoing Vaclav's patch than
this, but this patch is the one that Worked For Me.

2003-05-18  Martin Buchholz  <martin AT xemacs DOT org>

	* fhandler_disk_file.cc (open): Don't make files sparse.



Index: fhandler_disk_file.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_disk_file.cc,v
retrieving revision 1.50
diff -u -c -r1.50 fhandler_disk_file.cc
*** fhandler_disk_file.cc	11 May 2003 21:52:09 -0000	1.50
--- fhandler_disk_file.cc	18 May 2003 21:58:48 -0000
***************
*** 408,426 ****
        && !allow_ntsec && allow_ntea)
      set_file_attribute (has_acls (), get_win32_name (), mode);
  
-   /* Set newly created and truncated files as sparse files. */
-   if ((real_path->fs_flags () & FILE_SUPPORTS_SPARSE_FILES)
-       && (get_access () & GENERIC_WRITE) == GENERIC_WRITE
-       && (get_flags () & (O_CREAT | O_TRUNC)))
-     {
-       DWORD dw;
-       HANDLE h = get_handle ();
-       BOOL r = DeviceIoControl (h , FSCTL_SET_SPARSE, NULL, 0, 	NULL, 0, &dw,
- 				NULL);
-       syscall_printf ("%d = DeviceIoControl(0x%x, FSCTL_SET_SPARSE, NULL, 0, "
- 		      "NULL, 0, &dw, NULL)", r, h);
-     }
- 
    set_symlink_p (real_path->issymlink ());
    set_execable_p (real_path->exec_state ());
    set_socket_p (real_path->issocket ());
--- 408,413 ----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019