Skip to content

Commit

Permalink
01 May 2002 3390-9 and large file support - Greg Smith
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/jj/hercules.svn/trunk@874 956126f8-22a0-4046-8f4a-272fa8102e63
  • Loading branch information
Greg Smith committed May 2, 2002
1 parent d41aa33 commit 812a557
Show file tree
Hide file tree
Showing 16 changed files with 1,686 additions and 2,109 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
01 May 2002 3390-9 and large file support - Greg Smith
01 May 2002 CodePage support - Jan Jaeger
29 Apr 2002 Fix fthreads "trylock" for REAL this time - Fish
29 Apr 2002 Create console thread dynamically - Jan Jaeger
Expand Down
8 changes: 4 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -868,10 +868,10 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = $(noinst_HEADERS) ./stamp-h.in INSTALL Makefile.am \
Makefile.in TODO aclocal.m4 autoconf/README \
autoconf/config.guess autoconf/config.sub autoconf/depcomp \
autoconf/install-sh autoconf/missing autoconf/mkinstalldirs \
config.h.in configure configure.ac
Makefile.in aclocal.m4 autoconf/README autoconf/config.guess \
autoconf/config.sub autoconf/depcomp autoconf/install-sh \
autoconf/missing autoconf/mkinstalldirs config.h.in configure \
configure.ac
DIST_SUBDIRS = $(SUBDIRS)
SOURCES = $(cckd2ckd_SOURCES) $(cckdcdsk_SOURCES) $(cckdcomp_SOURCES) $(cckdswap_SOURCES) $(ckd2cckd_SOURCES) $(dasdcat_SOURCES) $(dasdinit_SOURCES) $(dasdisup_SOURCES) $(dasdload_SOURCES) $(dasdls_SOURCES) $(dasdpdsu_SOURCES) $(dmap2hrc_SOURCES) $(hercifc_SOURCES) $(hercules_SOURCES) $(EXTRA_hercules_SOURCES) $(hetget_SOURCES) $(hetinit_SOURCES) $(hetmap_SOURCES) $(hetupd_SOURCES) $(tapecopy_SOURCES) $(tapemap_SOURCES) $(tapesplt_SOURCES)

Expand Down
27 changes: 22 additions & 5 deletions cckd2ckd.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ int valid=1; /* Validate track images */
int swapend=0; /* Need to swap byte order */
int maxerrs=5; /* Max errors allowed */
int limited=0; /* 1=Limit cyls copied */
int lfs=0; /* 1=Large File supported */

#ifdef EXTERNALGUI
if (argc >= 1 && strncmp(argv[argc-1],"EXTERNALGUI",11) == 0)
Expand Down Expand Up @@ -130,6 +131,15 @@ int limited=0; /* 1=Limit cyls copied */
}
syntax ();

#if _FILE_OFFSET_BITS == 64 || defined(_LARGE_FILES)
case 'l': if (abbrev(argv[0], "-lfs"))
{
lfs = 1;
break;
}
syntax ();
#endif

default: syntax ();
}
}
Expand Down Expand Up @@ -225,7 +235,7 @@ int limited=0; /* 1=Limit cyls copied */
memset (&l2, 0, CCKD_L2TAB_SIZE);
else
{
rc = lseek (ifd, l1[i], SEEK_SET);
rc = lseek (ifd, (off_t)l1[i], SEEK_SET);
if (rc == -1)
{
fprintf (stderr, "cckd2ckd: %s lseek error: %s\n",
Expand Down Expand Up @@ -253,7 +263,10 @@ int limited=0; /* 1=Limit cyls copied */
/* perform some file calculations */
trks = cyls * heads;
bytes_per_cyl = trksz * heads;
cyls_per_file = (2147483647 - CKDDASD_DEVHDR_SIZE) /
if (lfs)
cyls_per_file = cyls;
else
cyls_per_file = (2147483647 - CKDDASD_DEVHDR_SIZE) /
bytes_per_cyl;
trks_per_file = cyls_per_file * heads;
files = (trks + trks_per_file - 1) / trks_per_file;
Expand Down Expand Up @@ -296,7 +309,7 @@ int limited=0; /* 1=Limit cyls copied */
memset (&l2, 0, CCKD_L2TAB_SIZE);
else
{
rc = lseek (ifd, l1[i], SEEK_SET);
rc = lseek (ifd, (off_t)l1[i], SEEK_SET);
if (rc == -1)
{
fprintf (stderr, "cckd2ckd: %s lseek error: %s\n",
Expand Down Expand Up @@ -382,7 +395,7 @@ int limited=0; /* 1=Limit cyls copied */
}
else
{
rc = lseek (ifd, l2[j].pos, SEEK_SET);
rc = lseek (ifd, (off_t)l2[j].pos, SEEK_SET);
if (rc == -1)
{
fprintf (stderr, "cckd2ckd: %s lseek error: %s\n",
Expand Down Expand Up @@ -557,7 +570,11 @@ void syntax ()
" are ignored. Default is 5\n"
" -quiet quiet mode, don't display status\n"
" -validate validate track images [default]\n"
" -novalidate don't validate track images\n");
" -novalidate don't validate track images\n"
#if _FILE_OFFSET_BITS == 64 || defined(_LARGE_FILES)
" -lfs build a large ckd file\n"
#endif
);
exit (21);
} /* end function syntax */

Expand Down
Loading

0 comments on commit 812a557

Please sign in to comment.