diff options
author | Rich Johnston <rjohnston@sgi.com> | 2012-11-09 13:23:59 +0000 |
---|---|---|
committer | Rich Johnston <rjohnston@sgi.com> | 2012-11-21 08:43:45 -0600 |
commit | 818a42652a158450c66760ca20a6bc29b7062f9b (patch) | |
tree | 989d959257f9537fbaccdd96e8cf550f3674ab7a /lib/datapid.c | |
parent | b03c662399956609934ff063e9064e15dc7459ac (diff) |
xfstests: remove unsupported conditionals
This patch removes the unsupported sgi and CRAY.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib/datapid.c')
-rw-r--r-- | lib/datapid.c | 179 |
1 files changed, 0 insertions, 179 deletions
diff --git a/lib/datapid.c b/lib/datapid.c index f6be3e76..2e53ad55 100644 --- a/lib/datapid.c +++ b/lib/datapid.c @@ -75,87 +75,8 @@ char *buffer; int bsize; int offset; { -#if CRAY - - int cnt; - int tmp; - char *chr; - long *wptr; - long word; - int woff; /* file offset for the word */ - int boff; /* buffer offset or index */ - int num_full_words; - - num_full_words = bsize/NBPW; - boff = 0; - - if ( cnt=(offset % NBPW) ) { /* partial word */ - - woff = offset - cnt; -#if DEBUG -printf("partial at beginning, cnt = %d, woff = %d\n", cnt, woff); -#endif - - word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid)); - - chr = (char *)&word; - - for (tmp=0; tmp<cnt; tmp++) { /* skip unused bytes */ - chr++; - } - - for (; boff<(NBPW-cnt) && boff<bsize; boff++, chr++) { - buffer[boff] = *chr; - } - } - - /* - * full words - */ - - num_full_words = (bsize-boff)/NBPW; - - woff = offset+boff; - - for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++ ) { - - word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid)); - - chr = (char *)&word; - for(tmp=0; tmp<NBPW; tmp++, chr++) { - buffer[boff++] = *chr; - } -/****** Only if wptr is a word ellined - wptr = (long *)&buffer[boff]; - *wptr = word; - boff += NBPW; -*****/ - - } - - /* - * partial word at end of buffer - */ - - if ( cnt=((bsize-boff) % NBPW) ) { -#if DEBUG -printf("partial at end\n"); -#endif - word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid)); - - chr = (char *)&word; - - for (tmp=0; tmp<cnt && boff<bsize; tmp++, chr++) { - buffer[boff++] = *chr; - } - } - - return bsize; - -#else return -1; /* not support on non-64 bits word machines */ -#endif } @@ -171,112 +92,12 @@ int bsize; int offset; char **errmsg; { -#if CRAY - - int cnt; - int tmp; - char *chr; - long *wptr; - long word; - int woff; /* file offset for the word */ - int boff; /* buffer offset or index */ - int num_full_words; - - - if ( errmsg != NULL ) { - *errmsg = Errmsg; - } - - - num_full_words = bsize/NBPW; - boff = 0; - - if ( cnt=(offset % NBPW) ) { /* partial word */ - woff = offset - cnt; - word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid)); - - chr = (char *)&word; - - for (tmp=0; tmp<cnt; tmp++) { /* skip unused bytes */ - chr++; - } - - for (; boff<(NBPW-cnt) && boff<bsize; boff++, chr++) { - if (buffer[boff] != *chr) { - sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o", - offset+boff, *chr, buffer[boff]); - return offset+boff; - } - } - } - - /* - * full words - */ - - num_full_words = (bsize-boff)/NBPW; - - woff = offset+boff; - - for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++ ) { - word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid)); - - chr = (char *)&word; - for(tmp=0; tmp<NBPW; tmp++, boff++, chr++) { - if ( buffer[boff] != *chr ) { - sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o", - woff, *chr, buffer[boff]); - return woff; - } - } - -/****** only if a word elined - wptr = (long *)&buffer[boff]; - if ( *wptr != word ) { - sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o", - woff, word, *wptr); - return woff; - } - boff += NBPW; -******/ - } - - /* - * partial word at end of buffer - */ - - if ( cnt=((bsize-boff) % NBPW) ) { -#if DEBUG -printf("partial at end\n"); -#endif - word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid)); - - chr = (char *)&word; - - - for (tmp=0; tmp<cnt && boff<bsize; boff++, tmp++, chr++) { - if ( buffer[boff] != *chr ) { - sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o", - offset+boff, *chr, buffer[boff]); - return offset+boff; - } - } - } - - sprintf(Errmsg, "all %d bytes match desired pattern", bsize); - return -1; /* buffer is ok */ - -#else - if ( errmsg != NULL ) { *errmsg = Errmsg; } sprintf(Errmsg, "Not supported on this OS."); return 0; -#endif - - } /* end of datapidchk */ #if UNIT_TEST |