diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-08-26 16:14:40 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-08-26 16:14:40 +0000 |
commit | 6585330779f88deedd9d215bd7c15b534f430d4a (patch) | |
tree | 7af2d8cf37959e4343778f2b7d3626ec9ef1f498 /winsup/cygwin/mtinfo.h | |
parent | 8451a289ccfb394922470880952aaa6a372122a1 (diff) | |
download | newlib-6585330779f88deedd9d215bd7c15b534f430d4a.zip newlib-6585330779f88deedd9d215bd7c15b534f430d4a.tar.gz newlib-6585330779f88deedd9d215bd7c15b534f430d4a.tar.bz2 |
* mtinfo.h (class mtinfo_part): Change type of block numbers to int64_t.
(mtinfo_part::initialize): Ditto for nblock parameter in declaration.
(class mtinfo_drive): Change type of block number to int64_t. Change
all parameters indicating a block number to int64_t in method
declarations.
* fhandler_tape.cc (mtinfo_part::initialize): Ditto in definition.
(mtinfo_drive::get_pos): Ditto. Replace low and high with a
ULARGE_INTEGER and use it's components in call to GetTapePosition.
Store full value in block.
(mtinfo_drive::_set_pos): Change type of count parameter to int64_t.
Change call to SetTapePosition accordingly.
(mtinfo_drive::set_pos): Change type of count parameter to int64_t.
Change local variables holding block numbers accordingly.
(mtinfo_drive::get_status): Don't bail out early if fetching media
parameters fails.
(mtinfo_drive::ioctl): Add explicit cast matching receiving type in
MTTELL and MTIOCPOS calls.
Diffstat (limited to 'winsup/cygwin/mtinfo.h')
-rw-r--r-- | winsup/cygwin/mtinfo.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/mtinfo.h b/winsup/cygwin/mtinfo.h index 157fe1b..e7624b7 100644 --- a/winsup/cygwin/mtinfo.h +++ b/winsup/cygwin/mtinfo.h @@ -1,6 +1,6 @@ /* mtinfo.h: Defininitions for the Cygwin tape driver class. - Copyright 2004, 2005, 2006, 2008, 2012 Red Hat, Inc. + Copyright 2004, 2005, 2006, 2008, 2012, 2013 Red Hat, Inc. This file is part of Cygwin. @@ -46,13 +46,13 @@ enum lock_state class mtinfo_part { public: - int32_t block; /* logical block no */ + int64_t block; /* logical block no */ + int64_t fblock; /* relative block no */ int32_t file; /* current file no */ - int32_t fblock; /* relative block no */ bool smark; /* At setmark? */ eom_val emark; /* "end-of"-mark */ - void initialize (int32_t nblock = -1); + void initialize (int64_t nblock = -1); }; class mtinfo_drive @@ -60,7 +60,7 @@ class mtinfo_drive int drive; int lasterr; int32_t partition; - int32_t block; + int64_t block; dirty_state dirty; lock_state lock; TAPE_GET_DRIVE_PARAMETERS _dp; @@ -94,8 +94,8 @@ class mtinfo_drive ? ((_dp.FeaturesHigh & parm) != 0) : ((_dp.FeaturesLow & parm) != 0)); } - int get_pos (HANDLE mt, int32_t *ppartition = NULL, int32_t *pblock = NULL); - int _set_pos (HANDLE mt, int mode, int32_t count, int partition, BOOL dont_wait); + int get_pos (HANDLE mt, int32_t *ppartition = NULL, int64_t *pblock = NULL); + int _set_pos (HANDLE mt, int mode, int64_t count, int partition, BOOL dont_wait); int create_partitions (HANDLE mt, int32_t count); int set_partition (HANDLE mt, int32_t count); int write_marks (HANDLE mt, int marktype, DWORD count); @@ -116,7 +116,7 @@ public: int read (HANDLE mt, LPOVERLAPPED pov, void *ptr, size_t &ulen); int write (HANDLE mt, LPOVERLAPPED pov, const void *ptr, size_t &len); int ioctl (HANDLE mt, unsigned int cmd, void *buf); - int set_pos (HANDLE mt, int mode, int32_t count, bool sfm_func); + int set_pos (HANDLE mt, int mode, int64_t count, bool sfm_func); IMPLEMENT_STATUS_FLAG (bool, buffer_writes) IMPLEMENT_STATUS_FLAG (bool, async_writes) |