aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorDmitry Potapov <dpotapov@gmail.com>2008-09-27 12:39:45 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-09-29 08:55:47 -0700
commit8252df62187e7fd35543552ffeab1e1eb048b57e (patch)
tree0540f1bce95924bf3803c27c9e01333d9d377383 /compat
parentd317851a7fd07f28890e6dc9bc2269da37c4122e (diff)
downloadgit-8252df62187e7fd35543552ffeab1e1eb048b57e.tar.gz
git-8252df62187e7fd35543552ffeab1e1eb048b57e.tar.xz
mingw: remove use of _getdrive() from lstat/fstat
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> Acked-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 7eed60db1..fc45d240f 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));