mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
* fhandler.h (fhandler_cygdrive::seekdir): Delete declaration.
(fhandler_cygdrive::seekdir): Delete. * fhandler.h (fhandler_cygdrive::iscygdrive_root): Delete method. (fhandler_cygdrive::telldir): Delete declaration. * fhandler_disk_file.cc: Remove all uses of fhandler_cygdrive::iscygdrive_root. (fhandler_disk_file::mkdir): New method. (fhandler_disk_file::rmdir): Ditto. (fhandler_cygdrive::telldir): Delete.
This commit is contained in:
parent
bfcec8f1d8
commit
969d6089ce
@ -1,3 +1,18 @@
|
|||||||
|
2005-05-19 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* fhandler.h (fhandler_cygdrive::seekdir): Delete declaration.
|
||||||
|
(fhandler_cygdrive::seekdir): Delete.
|
||||||
|
|
||||||
|
2005-05-19 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
|
* fhandler.h (fhandler_cygdrive::iscygdrive_root): Delete method.
|
||||||
|
(fhandler_cygdrive::telldir): Delete declaration.
|
||||||
|
* fhandler_disk_file.cc: Remove all uses of
|
||||||
|
fhandler_cygdrive::iscygdrive_root.
|
||||||
|
(fhandler_disk_file::mkdir): New method.
|
||||||
|
(fhandler_disk_file::rmdir): Ditto.
|
||||||
|
(fhandler_cygdrive::telldir): Delete.
|
||||||
|
|
||||||
2005-05-18 Christopher Faylor <cgf@timesys.com>
|
2005-05-18 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* external.cc: Move pids declaration to file scope and use less
|
* external.cc: Move pids declaration to file scope and use less
|
||||||
|
@ -106,8 +106,6 @@ enum fh_devices
|
|||||||
|
|
||||||
DEV_CYGDRIVE_MAJOR = 98,
|
DEV_CYGDRIVE_MAJOR = 98,
|
||||||
FH_CYGDRIVE= FHDEV (DEV_CYGDRIVE_MAJOR, 0),
|
FH_CYGDRIVE= FHDEV (DEV_CYGDRIVE_MAJOR, 0),
|
||||||
FH_CYGDRIVE_A= FHDEV (DEV_CYGDRIVE_MAJOR, 'a'),
|
|
||||||
FH_CYGDRIVE_Z= FHDEV (DEV_CYGDRIVE_MAJOR, 'z'),
|
|
||||||
|
|
||||||
DEV_TCP_MAJOR = 30,
|
DEV_TCP_MAJOR = 30,
|
||||||
FH_TCP = FHDEV (DEV_TCP_MAJOR, 36),
|
FH_TCP = FHDEV (DEV_TCP_MAJOR, 36),
|
||||||
|
@ -678,12 +678,9 @@ class fhandler_cygdrive: public fhandler_disk_file
|
|||||||
const char *pdrive;
|
const char *pdrive;
|
||||||
void set_drives ();
|
void set_drives ();
|
||||||
public:
|
public:
|
||||||
bool iscygdrive_root () { return !dev ().minor; }
|
|
||||||
fhandler_cygdrive ();
|
fhandler_cygdrive ();
|
||||||
DIR *opendir ();
|
DIR *opendir ();
|
||||||
struct dirent *readdir (DIR *);
|
struct dirent *readdir (DIR *);
|
||||||
_off64_t telldir (DIR *);
|
|
||||||
void seekdir (DIR *, _off64_t);
|
|
||||||
void rewinddir (DIR *);
|
void rewinddir (DIR *);
|
||||||
int closedir (DIR *);
|
int closedir (DIR *);
|
||||||
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
|
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
|
||||||
|
@ -1326,8 +1326,6 @@ fhandler_cygdrive::set_drives ()
|
|||||||
int
|
int
|
||||||
fhandler_cygdrive::fstat (struct __stat64 *buf)
|
fhandler_cygdrive::fstat (struct __stat64 *buf)
|
||||||
{
|
{
|
||||||
if (!iscygdrive_root ())
|
|
||||||
return fhandler_disk_file::fstat (buf);
|
|
||||||
buf->st_mode = S_IFDIR | 0555;
|
buf->st_mode = S_IFDIR | 0555;
|
||||||
if (!ndrives)
|
if (!ndrives)
|
||||||
set_drives ();
|
set_drives ();
|
||||||
@ -1341,7 +1339,7 @@ fhandler_cygdrive::opendir ()
|
|||||||
DIR *dir;
|
DIR *dir;
|
||||||
|
|
||||||
dir = fhandler_disk_file::opendir ();
|
dir = fhandler_disk_file::opendir ();
|
||||||
if (dir && iscygdrive_root () && !ndrives)
|
if (dir && !ndrives)
|
||||||
set_drives ();
|
set_drives ();
|
||||||
|
|
||||||
return dir;
|
return dir;
|
||||||
@ -1350,8 +1348,6 @@ fhandler_cygdrive::opendir ()
|
|||||||
struct dirent *
|
struct dirent *
|
||||||
fhandler_cygdrive::readdir (DIR *dir)
|
fhandler_cygdrive::readdir (DIR *dir)
|
||||||
{
|
{
|
||||||
if (!iscygdrive_root ())
|
|
||||||
return fhandler_disk_file::readdir (dir);
|
|
||||||
if (!pdrive || !*pdrive)
|
if (!pdrive || !*pdrive)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (GetFileAttributes (pdrive) == INVALID_FILE_ATTRIBUTES)
|
if (GetFileAttributes (pdrive) == INVALID_FILE_ATTRIBUTES)
|
||||||
@ -1369,23 +1365,9 @@ fhandler_cygdrive::readdir (DIR *dir)
|
|||||||
return dir->__d_dirent;
|
return dir->__d_dirent;
|
||||||
}
|
}
|
||||||
|
|
||||||
_off64_t
|
|
||||||
fhandler_cygdrive::telldir (DIR *dir)
|
|
||||||
{
|
|
||||||
return fhandler_disk_file::telldir (dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
fhandler_cygdrive::seekdir (DIR *dir, _off64_t loc)
|
|
||||||
{
|
|
||||||
return fhandler_disk_file::seekdir (dir, loc);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fhandler_cygdrive::rewinddir (DIR *dir)
|
fhandler_cygdrive::rewinddir (DIR *dir)
|
||||||
{
|
{
|
||||||
if (!iscygdrive_root ())
|
|
||||||
return fhandler_disk_file::rewinddir (dir);
|
|
||||||
pdrive = get_win32_name ();
|
pdrive = get_win32_name ();
|
||||||
dir->__d_position = 0;
|
dir->__d_position = 0;
|
||||||
return;
|
return;
|
||||||
@ -1394,8 +1376,6 @@ fhandler_cygdrive::rewinddir (DIR *dir)
|
|||||||
int
|
int
|
||||||
fhandler_cygdrive::closedir (DIR *dir)
|
fhandler_cygdrive::closedir (DIR *dir)
|
||||||
{
|
{
|
||||||
if (!iscygdrive_root ())
|
|
||||||
return fhandler_disk_file::closedir (dir);
|
|
||||||
pdrive = get_win32_name ();
|
pdrive = get_win32_name ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user