git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/4] mingw: remove use of _getdrive() from lstat/fstat
@ 2008-09-27  8:39 Dmitry Potapov
  2008-09-27 19:38 ` Johannes Sixt
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Potapov @ 2008-09-27  8:39 UTC (permalink / raw
  To: Git Mailing List
  Cc: Junio C Hamano, Shawn O. Pearce, Alex Riesen, Dmitry Potapov,
	Johannes Sixt, Marcus Griep

The field device is not used by Git, and putting the number of the
current device is meaningless anyway.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
---
 compat/mingw.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/compat/mingw.c b/compat/mingw.c
index ccfa2a0..a2b8cd7 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -31,7 +31,6 @@ static inline time_t filetime_to_time_t(const FILETIME *ft)
 	return (time_t)winTime;
 }
 
-extern int _getdrive( void );
 /* We keep the do_lstat code in a separate function to avoid recursion.
  * When a path ends with a slash, the stat will fail with ENOENT. In
  * this case, we strip the trailing slashes and stat again.
@@ -55,7 +54,7 @@ static int do_lstat(const char *file_name, struct stat *buf)
 		buf->st_nlink = 1;
 		buf->st_mode = fMode;
 		buf->st_size = fdata.nFileSizeLow; /* Can't use nFileSizeHigh, since it's not a stat64 */
-		buf->st_dev = buf->st_rdev = (_getdrive() - 1);
+		buf->st_dev = buf->st_rdev = 0; /* not used by Git */
 		buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime));
 		buf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime));
 		buf->st_ctime = filetime_to_time_t(&(fdata.ftCreationTime));
@@ -145,7 +144,7 @@ int mingw_fstat(int fd, struct stat *buf)
 		buf->st_nlink = 1;
 		buf->st_mode = fMode;
 		buf->st_size = fdata.nFileSizeLow; /* Can't use nFileSizeHigh, since it's not a stat64 */
-		buf->st_dev = buf->st_rdev = (_getdrive() - 1);
+		buf->st_dev = buf->st_rdev = 0; /* not used by Git */
 		buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime));
 		buf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime));
 		buf->st_ctime = filetime_to_time_t(&(fdata.ftCreationTime));
-- 
1.6.0.2.237.g0297e5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/4] mingw: remove use of _getdrive() from lstat/fstat
  2008-09-27  8:39 [PATCH 1/4] mingw: remove use of _getdrive() from lstat/fstat Dmitry Potapov
@ 2008-09-27 19:38 ` Johannes Sixt
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Sixt @ 2008-09-27 19:38 UTC (permalink / raw
  To: Dmitry Potapov
  Cc: git, Junio C Hamano, Shawn O. Pearce, Alex Riesen, Marcus Griep

On Samstag, 27. September 2008, Dmitry Potapov wrote:
> The field device is not used by Git, and putting the number of the
> current device is meaningless anyway.

Acked-by: Johannes Sixt <johannes.sixt@telecom.at>

-- Hannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-27 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-27  8:39 [PATCH 1/4] mingw: remove use of _getdrive() from lstat/fstat Dmitry Potapov
2008-09-27 19:38 ` Johannes Sixt

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).