From 0b1abc94b84a691f56bb32922c3c57c25e0dd1fd Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 11 Dec 2004 12:03:38 +0000 Subject: [PATCH] SHERLOCK_HAVE_PREAD -> HAVE_PREAD. --- lib/lfs.h | 4 ++-- lib/pagecache.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/lfs.h b/lib/lfs.h index 501a5fc7..5a103a66 100644 --- a/lib/lfs.h +++ b/lib/lfs.h @@ -1,5 +1,5 @@ /* - * Sherlock Library -- Large File Support + * UCW Library -- Large File Support * * (c) 1999--2002 Martin Mares * @@ -35,7 +35,7 @@ #endif /* !CONFIG_LARGE_FILES */ -#define SHERLOCK_HAVE_PREAD +#define HAVE_PREAD static inline sh_off_t sh_file_size(byte *name) diff --git a/lib/pagecache.c b/lib/pagecache.c index 6a2643df..13ad3660 100644 --- a/lib/pagecache.c +++ b/lib/pagecache.c @@ -1,5 +1,5 @@ /* - * Sherlock Library -- File Page Cache + * UCW Library -- File Page Cache * * (c) 1999--2002 Martin Mares * @@ -31,7 +31,7 @@ struct page_cache { uns stat_miss; /* Number of cache misses */ uns stat_write; /* Number of writes */ list *hash_table; /* List heads corresponding to hash buckets */ -#ifndef SHERLOCK_HAVE_PREAD +#ifndef HAVE_PREAD sh_off_t pos; /* Current position in the file */ int pos_fd; /* FD the position corresponds to */ #endif @@ -55,7 +55,7 @@ pgc_open(uns page_size, uns max_pages) c->hash_table = xmalloc(sizeof(list) * c->hash_size); for(i=0; ihash_size; i++) init_list(&c->hash_table[i]); -#ifndef SHERLOCK_HAVE_PREAD +#ifndef HAVE_PREAD c->pos_fd = -1; #endif return c; @@ -105,7 +105,7 @@ flush_page(struct page_cache *c, struct page *p) int s; ASSERT(p->flags & PG_FLAG_DIRTY); -#ifdef SHERLOCK_HAVE_PREAD +#ifdef HAVE_PREAD s = sh_pwrite(p->fd, p->data, c->page_size, p->pos); #else if (c->pos != p->pos || c->pos_fd != (int) p->fd) @@ -282,7 +282,7 @@ pgc_read(struct page_cache *c, int fd, sh_off_t pos) else { c->stat_miss++; -#ifdef SHERLOCK_HAVE_PREAD +#ifdef HAVE_PREAD s = sh_pread(fd, p->data, c->page_size, pos); #else if (c->pos != pos || c->pos_fd != (int)fd) -- 2.39.2