diff options
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/cachefslog/cachefslog.c | 8 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/cachefspack/Makefile | 6 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/cachefspack/docmds.c | 7 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/cachefspack/main.c | 7 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/cachefsstat/cachefsstat.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/common/stats_create.c | 36 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/common/stats_log.c | 50 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/common/subr.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/fsck/res.c | 23 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/fsck/res.h | 11 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/mdbug/dbug.c | 33 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/mount/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/mount/mount.c | 3 | ||||
| -rw-r--r-- | usr/src/cmd/fs.d/cachefs/umount/Makefile | 4 |
14 files changed, 103 insertions, 97 deletions
diff --git a/usr/src/cmd/fs.d/cachefs/cachefslog/cachefslog.c b/usr/src/cmd/fs.d/cachefs/cachefslog/cachefslog.c index 9ec29ad0fb..5e62c89828 100644 --- a/usr/src/cmd/fs.d/cachefs/cachefslog/cachefslog.c +++ b/usr/src/cmd/fs.d/cachefs/cachefslog/cachefslog.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -187,8 +187,8 @@ main(int argc, char **argv) free(k); continue; } - if (strcmp((char *)origk->ks_cachedir, - (char *)k->ks_cachedir) != 0) { + if (strcmp((char *)(uintptr_t)origk->ks_cachedir, + (char *)(uintptr_t)k->ks_cachedir) != 0) { free(k); continue; } @@ -199,7 +199,7 @@ main(int argc, char **argv) if (! before) printf("\n"); before = 1; - log_show((char *)k->ks_mountpoint, logfile); + log_show((char *)(uintptr_t)k->ks_mountpoint, logfile); free(k); } free(origk); diff --git a/usr/src/cmd/fs.d/cachefs/cachefspack/Makefile b/usr/src/cmd/fs.d/cachefs/cachefspack/Makefile index 8938b7233d..0a8d7d3ec8 100644 --- a/usr/src/cmd/fs.d/cachefs/cachefspack/Makefile +++ b/usr/src/cmd/fs.d/cachefs/cachefspack/Makefile @@ -22,8 +22,8 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1995,1996 by Sun Microsystems, Inc. -# All Rights Reserved +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # cmd/fs.d/cachefs/cachefspack # @@ -41,7 +41,7 @@ PROGOBJS= docmds.o elfrd.o funcs.o subr.o rules.o main.o include ../Makefile.cachefs -CPPFLAGS += -D_LARGEFILE64_SOURCE -I../.. -o $@ +CPPFLAGS += -D_LARGEFILE64_SOURCE -I../.. LDLIBS += -lelf -lgen $(LIBPROG) : $(CFSLIB) diff --git a/usr/src/cmd/fs.d/cachefs/cachefspack/docmds.c b/usr/src/cmd/fs.d/cachefs/cachefspack/docmds.c index 6b28bf2414..24a0055290 100644 --- a/usr/src/cmd/fs.d/cachefs/cachefspack/docmds.c +++ b/usr/src/cmd/fs.d/cachefs/cachefspack/docmds.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -495,7 +495,7 @@ out: * of the string. */ int -slash_cnt(char * str) +slash_cnt(char *str) { char *p = str; int len; @@ -665,6 +665,7 @@ process_symlk(char *lkpath, char *relpath, int rel_lastpos, } } +int discont_srch(int flags, char *pat) { char *wild; @@ -700,7 +701,7 @@ discont_srch(int flags, char *pat) } #ifdef DEBUG -prtitem(char * str, struct item *hd) +prtitem(char *str, struct item *hd) { struct item *p = hd->i_next; diff --git a/usr/src/cmd/fs.d/cachefs/cachefspack/main.c b/usr/src/cmd/fs.d/cachefs/cachefspack/main.c index db0ea68b2a..530c812f07 100644 --- a/usr/src/cmd/fs.d/cachefs/cachefspack/main.c +++ b/usr/src/cmd/fs.d/cachefs/cachefspack/main.c @@ -20,8 +20,8 @@ * CDDL HEADER END */ /* - * Copyright (c) 1996-1998, by Sun Microsystems, Inc. - * All Rights Reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -194,8 +194,7 @@ main(int argc, char **argv) rewind(rfd); read_rules(rfd, wrkfunc); fclose(rfd); - exit(0); - + return (0); } /* diff --git a/usr/src/cmd/fs.d/cachefs/cachefsstat/cachefsstat.c b/usr/src/cmd/fs.d/cachefs/cachefsstat/cachefsstat.c index 38a6538f93..fb2247e8ad 100644 --- a/usr/src/cmd/fs.d/cachefs/cachefsstat/cachefsstat.c +++ b/usr/src/cmd/fs.d/cachefs/cachefsstat/cachefsstat.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -161,7 +161,7 @@ print_stats(stats_cookie_t *sc, cachefs_kstat_key_t *key, int zero) gccount = stats_gc_count(sc); - printf("\n %s\n", (char *)key->ks_mountpoint); + printf("\n %s\n", (char *)(uintptr_t)key->ks_mountpoint); printf(gettext( "\t cache hit rate: %5u%% (%llu hits, %u misses)\n"), hitp, hits, misses); diff --git a/usr/src/cmd/fs.d/cachefs/common/stats_create.c b/usr/src/cmd/fs.d/cachefs/common/stats_create.c index 6891704e86..f3f4c549f3 100644 --- a/usr/src/cmd/fs.d/cachefs/common/stats_create.c +++ b/usr/src/cmd/fs.d/cachefs/common/stats_create.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -130,7 +130,7 @@ stats_create_mountpath(char *mountpath, char *progname) if (! k[i].ks_mounted) continue; - if ((stat64((char *)k[i].ks_mountpoint, &s) == 0) && + if ((stat64((char *)(uintptr_t)k[i].ks_mountpoint, &s) == 0) && (s.st_dev == dev) && (s.st_ino == ino)) break; @@ -204,10 +204,10 @@ out: prc->ks_cacheid += (uintptr_t)k; size = sizeof (*rc); - size += strlen((char *)prc->ks_mountpoint) + 1; - size += strlen((char *)prc->ks_backfs) + 1; - size += strlen((char *)prc->ks_cachedir) + 1; - size += strlen((char *)prc->ks_cacheid) + 1; + size += strlen((char *)(uintptr_t)prc->ks_mountpoint) + 1; + size += strlen((char *)(uintptr_t)prc->ks_backfs) + 1; + size += strlen((char *)(uintptr_t)prc->ks_cachedir) + 1; + size += strlen((char *)(uintptr_t)prc->ks_cacheid) + 1; if ((rc = (cachefs_kstat_key_t *) malloc(size)) == NULL) { @@ -217,16 +217,16 @@ out: memcpy(rc, prc, sizeof (*rc)); s = (char *)((uintptr_t)rc + sizeof (*rc)); - (void) strcpy(s, (char *)prc->ks_mountpoint); + (void) strcpy(s, (char *)(uintptr_t)prc->ks_mountpoint); rc->ks_mountpoint = (uintptr_t)s; s += strlen(s) + 1; - (void) strcpy(s, (char *)prc->ks_backfs); + (void) strcpy(s, (char *)(uintptr_t)prc->ks_backfs); rc->ks_backfs = (uintptr_t)s; s += strlen(s) + 1; - (void) strcpy(s, (char *)prc->ks_cachedir); + (void) strcpy(s, (char *)(uintptr_t)prc->ks_cachedir); rc->ks_cachedir = (uintptr_t)s; s += strlen(s) + 1; - (void) strcpy(s, (char *)prc->ks_cacheid); + (void) strcpy(s, (char *)(uintptr_t)prc->ks_cacheid); rc->ks_cacheid = (uintptr_t)s; } } @@ -259,10 +259,10 @@ stats_getkey(stats_cookie_t *st) k->ks_cachedir += (uintptr_t)key; k->ks_cacheid += (uintptr_t)key; size = sizeof (*rc); - size += strlen((char *)k->ks_mountpoint) + 1; - size += strlen((char *)k->ks_backfs) + 1; - size += strlen((char *)k->ks_cachedir) + 1; - size += strlen((char *)k->ks_cacheid) + 1; + size += strlen((char *)(uintptr_t)k->ks_mountpoint) + 1; + size += strlen((char *)(uintptr_t)k->ks_backfs) + 1; + size += strlen((char *)(uintptr_t)k->ks_cachedir) + 1; + size += strlen((char *)(uintptr_t)k->ks_cacheid) + 1; if ((rc = (cachefs_kstat_key_t *)malloc(size)) == NULL) stats_perror(st, SE_NOMEM, @@ -271,16 +271,16 @@ stats_getkey(stats_cookie_t *st) memcpy(rc, k, sizeof (*rc)); s = (char *)((uintptr_t)rc + sizeof (*rc)); - (void) strcpy(s, (char *)k->ks_mountpoint); + (void) strcpy(s, (char *)(uintptr_t)k->ks_mountpoint); rc->ks_mountpoint = (uintptr_t)s; s += strlen(s) + 1; - (void) strcpy(s, (char *)k->ks_backfs); + (void) strcpy(s, (char *)(uintptr_t)k->ks_backfs); rc->ks_backfs = (uintptr_t)s; s += strlen(s) + 1; - (void) strcpy(s, (char *)k->ks_cachedir); + (void) strcpy(s, (char *)(uintptr_t)k->ks_cachedir); rc->ks_cachedir = (uintptr_t)s; s += strlen(s) + 1; - (void) strcpy(s, (char *)k->ks_cacheid); + (void) strcpy(s, (char *)(uintptr_t)k->ks_cacheid); rc->ks_cacheid = (uintptr_t)s; s += strlen(s) + 1; } diff --git a/usr/src/cmd/fs.d/cachefs/common/stats_log.c b/usr/src/cmd/fs.d/cachefs/common/stats_log.c index 149bb95b66..09b06392dd 100644 --- a/usr/src/cmd/fs.d/cachefs/common/stats_log.c +++ b/usr/src/cmd/fs.d/cachefs/common/stats_log.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1283,7 +1283,7 @@ stats_log_get_record_info(stats_cookie_t *sc, getpagep = (struct cachefs_log_getpage_record *)recp; *fidp = &getpagep->fid; *filenop = getpagep->fileno; - *vfsp = (caddr_t)getpagep->vfsp; + *vfsp = (caddr_t)(uintptr_t)getpagep->vfsp; *offp = getpagep->offset; *lenp = (u_offset_t)getpagep->len; rc = (GRI_ADD | GRI_EXPENSIVE); @@ -1293,7 +1293,7 @@ stats_log_get_record_info(stats_cookie_t *sc, readdirp = (struct cachefs_log_readdir_record *)recp; *fidp = &readdirp->fid; *filenop = readdirp->fileno; - *vfsp = (caddr_t)readdirp->vfsp; + *vfsp = (caddr_t)(uintptr_t)readdirp->vfsp; *offp = readdirp->offset; *lenp = (u_offset_t)sc->st_loghead.lh_maxbsize; rc = (GRI_ADD | GRI_EXPENSIVE); @@ -1303,7 +1303,7 @@ stats_log_get_record_info(stats_cookie_t *sc, readlinkp = (struct cachefs_log_readlink_record *)recp; *fidp = &readlinkp->fid; *filenop = readlinkp->fileno; - *vfsp = (caddr_t)readlinkp->vfsp; + *vfsp = (caddr_t)(uintptr_t)readlinkp->vfsp; *offp = 0LL; *lenp = (u_offset_t)((readlinkp->length > C_FSL_SIZE) ? readlinkp->length : 0); @@ -1314,7 +1314,7 @@ stats_log_get_record_info(stats_cookie_t *sc, removep = (struct cachefs_log_remove_record *)recp; *fidp = &removep->fid; *filenop = removep->fileno; - *vfsp = (caddr_t)removep->vfsp; + *vfsp = (caddr_t)(uintptr_t)removep->vfsp; *offp = *lenp = 0LL; rc = (GRI_TRUNC | GRI_MODIFY); break; @@ -1323,7 +1323,7 @@ stats_log_get_record_info(stats_cookie_t *sc, rmdirp = (struct cachefs_log_rmdir_record *)recp; *fidp = &rmdirp->fid; *filenop = rmdirp->fileno; - *vfsp = (caddr_t)rmdirp->vfsp; + *vfsp = (caddr_t)(uintptr_t)rmdirp->vfsp; *offp = *lenp = 0LL; rc = (GRI_TRUNC | GRI_MODIFY); break; @@ -1332,7 +1332,7 @@ stats_log_get_record_info(stats_cookie_t *sc, truncatep = (struct cachefs_log_truncate_record *)recp; *fidp = &truncatep->fid; *filenop = truncatep->fileno; - *vfsp = (caddr_t)truncatep->vfsp; + *vfsp = (caddr_t)(uintptr_t)truncatep->vfsp; *offp = 0LL; *lenp = truncatep->size; rc = (GRI_TRUNC | GRI_MODIFY); @@ -1342,7 +1342,7 @@ stats_log_get_record_info(stats_cookie_t *sc, putpagep = (struct cachefs_log_putpage_record *)recp; *fidp = &putpagep->fid; *filenop = putpagep->fileno; - *vfsp = (caddr_t)putpagep->vfsp; + *vfsp = (caddr_t)(uintptr_t)putpagep->vfsp; *offp = putpagep->offset; *lenp = (u_offset_t)putpagep->len; rc = (GRI_ADD | GRI_MODIFY); @@ -1352,7 +1352,7 @@ stats_log_get_record_info(stats_cookie_t *sc, createp = (struct cachefs_log_create_record *)recp; *fidp = &createp->fid; *filenop = createp->fileno; - *vfsp = (caddr_t)createp->vfsp; + *vfsp = (caddr_t)(uintptr_t)createp->vfsp; *offp = *lenp = 0LL; rc = (GRI_ADD | GRI_MODIFY); break; @@ -1361,7 +1361,7 @@ stats_log_get_record_info(stats_cookie_t *sc, mkdirp = (struct cachefs_log_mkdir_record *)recp; *fidp = &mkdirp->fid; *filenop = mkdirp->fileno; - *vfsp = (caddr_t)mkdirp->vfsp; + *vfsp = (caddr_t)(uintptr_t)mkdirp->vfsp; *offp = *lenp = 0LL; rc = (GRI_ADD | GRI_MODIFY); break; @@ -1370,7 +1370,7 @@ stats_log_get_record_info(stats_cookie_t *sc, renamep = (struct cachefs_log_rename_record *)recp; *fidp = &renamep->gone; *filenop = renamep->fileno; - *vfsp = (caddr_t)renamep->vfsp; + *vfsp = (caddr_t)(uintptr_t)renamep->vfsp; *offp = *lenp = 0LL; rc = GRI_MODIFY; if (renamep->removed) @@ -1381,7 +1381,7 @@ stats_log_get_record_info(stats_cookie_t *sc, symlinkp = (struct cachefs_log_symlink_record *)recp; *fidp = &symlinkp->fid; *filenop = symlinkp->fileno; - *vfsp = (caddr_t)symlinkp->vfsp; + *vfsp = (caddr_t)(uintptr_t)symlinkp->vfsp; *offp = 0LL; *lenp = (u_offset_t)((symlinkp->size > C_FSL_SIZE) ? symlinkp->size : 0); @@ -1392,7 +1392,7 @@ stats_log_get_record_info(stats_cookie_t *sc, populatep = (struct cachefs_log_populate_record *)recp; *fidp = &populatep->fid; *filenop = populatep->fileno; - *vfsp = (caddr_t)populatep->vfsp; + *vfsp = (caddr_t)(uintptr_t)populatep->vfsp; *offp = populatep->off; *lenp = (u_offset_t)populatep->size; rc = GRI_ADD; @@ -1402,7 +1402,7 @@ stats_log_get_record_info(stats_cookie_t *sc, csymlinkp = (struct cachefs_log_csymlink_record *)recp; *fidp = &csymlinkp->fid; *filenop = csymlinkp->fileno; - *vfsp = (caddr_t)csymlinkp->vfsp; + *vfsp = (caddr_t)(uintptr_t)csymlinkp->vfsp; *offp = 0LL; *lenp = (u_offset_t)((csymlinkp->size > C_FSL_SIZE) ? csymlinkp->size : 0); @@ -1413,7 +1413,7 @@ stats_log_get_record_info(stats_cookie_t *sc, filldirp = (struct cachefs_log_filldir_record *)recp; *fidp = &filldirp->fid; *filenop = filldirp->fileno; - *vfsp = (caddr_t)filldirp->vfsp; + *vfsp = (caddr_t)(uintptr_t)filldirp->vfsp; *offp = 0LL; *lenp = (u_offset_t)(filldirp->size); rc = GRI_ADD; @@ -1423,7 +1423,7 @@ stats_log_get_record_info(stats_cookie_t *sc, mdcreatep = (struct cachefs_log_mdcreate_record *)recp; *fidp = &mdcreatep->fid; *filenop = mdcreatep->fileno; - *vfsp = (caddr_t)mdcreatep->vfsp; + *vfsp = (caddr_t)(uintptr_t)mdcreatep->vfsp; *lenp = (u_offset_t)mdcreatep->count; rc = GRI_METADATA; break; @@ -1432,7 +1432,7 @@ stats_log_get_record_info(stats_cookie_t *sc, gpfrontp = (struct cachefs_log_gpfront_record *)recp; *fidp = &gpfrontp->fid; *filenop = gpfrontp->fileno; - *vfsp = (caddr_t)gpfrontp->vfsp; + *vfsp = (caddr_t)(uintptr_t)gpfrontp->vfsp; *offp = gpfrontp->off; *lenp = (u_offset_t)sc->st_loghead.lh_pagesize; rc = (GRI_ADD | GRI_EXPENSIVE); @@ -1443,7 +1443,7 @@ stats_log_get_record_info(stats_cookie_t *sc, rfdirp->error = 0; *fidp = &rfdirp->fid; *filenop = rfdirp->fileno; - *vfsp = (caddr_t)rfdirp->vfsp; + *vfsp = (caddr_t)(uintptr_t)rfdirp->vfsp; *offp = 0LL; *lenp = (u_offset_t)sc->st_loghead.lh_maxbsize; rc = (GRI_ADD | GRI_EXPENSIVE); @@ -1453,7 +1453,7 @@ stats_log_get_record_info(stats_cookie_t *sc, uallocp = (struct cachefs_log_ualloc_record *)recp; *fidp = &uallocp->fid; *filenop = uallocp->fileno; - *vfsp = (caddr_t)uallocp->vfsp; + *vfsp = (caddr_t)(uintptr_t)uallocp->vfsp; *offp = uallocp->off; *lenp = (u_offset_t)uallocp->len; rc = (GRI_ADD); @@ -1463,7 +1463,7 @@ stats_log_get_record_info(stats_cookie_t *sc, callocp = (struct cachefs_log_calloc_record *)recp; *fidp = &callocp->fid; *filenop = callocp->fileno; - *vfsp = (caddr_t)callocp->vfsp; + *vfsp = (caddr_t)(uintptr_t)callocp->vfsp; *offp = callocp->off; *lenp = (u_offset_t)callocp->len; rc = (GRI_ADD | GRI_EXPENSIVE); @@ -1473,7 +1473,7 @@ stats_log_get_record_info(stats_cookie_t *sc, nocachep = (struct cachefs_log_nocache_record *)recp; *fidp = &nocachep->fid; *filenop = nocachep->fileno; - *vfsp = (caddr_t)nocachep->vfsp; + *vfsp = (caddr_t)(uintptr_t)nocachep->vfsp; *offp = *lenp = 0LL; rc = (GRI_TRUNC); break; @@ -1752,7 +1752,8 @@ stats_log_compute_wssize(stats_cookie_t *st) break; } - stats_dbm_store_byvfsp(st, (caddr_t)mountp->vfsp, mi); + stats_dbm_store_byvfsp(st, + (caddr_t)(uintptr_t)mountp->vfsp, mi); break; case CACHEFS_LOG_UMOUNT: @@ -1760,11 +1761,12 @@ stats_log_compute_wssize(stats_cookie_t *st) if (umountp->error != 0) break; mip = stats_dbm_fetch_byvfsp(st, - (caddr_t)umountp->vfsp); + (caddr_t)(uintptr_t)umountp->vfsp); if (mip == NULL) break; mip->mi_mounted = 0; - stats_dbm_store_byvfsp(st, (caddr_t)umountp->vfsp, mip); + stats_dbm_store_byvfsp(st, + (caddr_t)(uintptr_t)umountp->vfsp, mip); free(mip); break; diff --git a/usr/src/cmd/fs.d/cachefs/common/subr.c b/usr/src/cmd/fs.d/cachefs/common/subr.c index 363830a0af..887379c987 100644 --- a/usr/src/cmd/fs.d/cachefs/common/subr.c +++ b/usr/src/cmd/fs.d/cachefs/common/subr.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -544,7 +544,7 @@ cachefs_create_cache(char *dirp, struct cachefs_user_values *uv, snprintf(path, sizeof (path), "%s/%s", dirp, NOBACKUP_NAME); if ((fp = fopen(path, "w")) != NULL) { if (realpath(dirp, path) != NULL) { - fprintf(fp, "<< ./ >>\n", path); + fprintf(fp, "<< ./ >>\n"); fprintf(fp, "+skip: .?* *\n"); if (fclose(fp) == 0) xx = 1; diff --git a/usr/src/cmd/fs.d/cachefs/fsck/res.c b/usr/src/cmd/fs.d/cachefs/fsck/res.c index 6523874f1e..6331f213ab 100644 --- a/usr/src/cmd/fs.d/cachefs/fsck/res.c +++ b/usr/src/cmd/fs.d/cachefs/fsck/res.c @@ -20,6 +20,10 @@ * CDDL HEADER END */ /* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ +/* * * res.c * @@ -28,11 +32,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -/* - * Copyright (c) 1996, by Sun Microsystems, Inc. - * All rights reserved. - */ - #include <assert.h> #include <stdio.h> #include <stdlib.h> @@ -66,7 +65,7 @@ struct res { #define CVBLKS(nbytes) ((nbytes + MAXBSIZE - 1) / MAXBSIZE) /* forward references */ -void res_rlent_moveto(res *resp, enum cachefs_rl_type type, u_int entno, +void res_rlent_moveto(res *resp, enum cachefs_rl_type type, uint_t entno, long blks); void res_reset(res *resp); void res_clear(res *resp); @@ -224,10 +223,10 @@ res_destroy(res *resp) } rl_entry_t * -res_rlent_get(res *resp, u_int entno) +res_rlent_get(res *resp, uint_t entno) { rl_entry_t *rlentp, *window; - u_int whichwindow, winoffset; + uint_t whichwindow, winoffset; precond((entno >= MININDEX) && (entno < resp->p_totentries)); @@ -235,7 +234,7 @@ res_rlent_get(res *resp, u_int entno) winoffset = entno % CACHEFS_RLPMBS; window = (rl_entry_t *) - (((caddr_t) resp->p_rlentp) + (MAXBSIZE * whichwindow)); + (((caddr_t)resp->p_rlentp) + (MAXBSIZE * whichwindow)); rlentp = window + winoffset; return (rlentp); @@ -623,7 +622,7 @@ res_addident(res *resp, int index, rl_entry_t *dp, long nbytes, int file) * precond(ident is in use) */ -int +void res_clearident(res *resp, int index, int nbytes, int file) { rl_entry_t *rlentp; @@ -654,10 +653,10 @@ res_clearident(res *resp, int index, int nbytes, int file) */ void -res_rlent_moveto(res *resp, enum cachefs_rl_type type, u_int entno, long blks) +res_rlent_moveto(res *resp, enum cachefs_rl_type type, uint_t entno, long blks) { rl_entry_t *rl_ent; - u_int prev, next; + uint_t prev, next; cachefs_rl_listhead_t *lhp; enum cachefs_rl_type otype; diff --git a/usr/src/cmd/fs.d/cachefs/fsck/res.h b/usr/src/cmd/fs.d/cachefs/fsck/res.h index 805f86b917..57f4fa15e0 100644 --- a/usr/src/cmd/fs.d/cachefs/fsck/res.h +++ b/usr/src/cmd/fs.d/cachefs/fsck/res.h @@ -20,6 +20,10 @@ * CDDL HEADER END */ /* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ +/* * * res.h * @@ -31,11 +35,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -/* - * Copyright (c) 1996, by Sun Microsystems, Inc. - * All rights reserved. - */ - #ifndef cfs_fsck_res_h #define cfs_fsck_res_h @@ -46,7 +45,7 @@ void res_destroy(res *resp); int res_done(res *resp); void res_addfile(res *resp, long nbytes); int res_addident(res *resp, int index, rl_entry_t *dp, long nbytes, int file); -int res_clearident(res *resp, int index, int nbytes, int file); +void res_clearident(res *resp, int index, int nbytes, int file); #endif /* cfs_fsck_res_h */ diff --git a/usr/src/cmd/fs.d/cachefs/mdbug/dbug.c b/usr/src/cmd/fs.d/cachefs/mdbug/dbug.c index 89241d2107..175a7247da 100644 --- a/usr/src/cmd/fs.d/cachefs/mdbug/dbug.c +++ b/usr/src/cmd/fs.d/cachefs/mdbug/dbug.c @@ -20,6 +20,10 @@ * CDDL HEADER END */ /* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ +/* * * dbug.c * @@ -30,7 +34,6 @@ * */ #pragma ident "%Z%%M% %I% %E% SMI" -/* Copyright (c) 1994-1997 by Sun Microsystems, Inc. */ #ifndef DBUG_OFF @@ -61,8 +64,8 @@ static FILE *openfile(char *name); static boolean writable(char *pathname); static void changeowner(char *pathname); static int delayarg(int value); -static void delay(u_int xx); -static u_long getclock(); +static void delay(uint_t xx); +static ulong_t getclock(); static char *mystrtok(char *s1, char *s2); void doabort(); @@ -130,7 +133,7 @@ dbug_object_create(int line, const char *file, const char *function) { dbug_object_t *dbug_object_p; dbug_state_object_t *dbug_state_object_p; - u_long stacksize; + ulong_t stacksize; int created = 0; char *cptr; @@ -209,7 +212,7 @@ dbug_object_create(int line, const char *file, const char *function) * the start of the routine and specifying that that stack * values apply upto but not including the current routine. */ - stacksize = (u_long)this; + stacksize = (ulong_t)this; if (GROWDOWN) stacksize = tdp->td_stackinit - stacksize; else @@ -883,7 +886,7 @@ db_process(const char *namep) #ifdef STACKINIT GET_THREAD_DATA_PTR(&tdp); - tdp->td_stackinit = (u_long)this; + tdp->td_stackinit = (ulong_t)this; #endif } @@ -1061,11 +1064,13 @@ doprefix(dbug_state_object_t *dbug_state_object_p, int line, long lineno, { #if DBUG_UNIX if (dbug_state_object_p->sf_pid) - fprintf(dbug_state_object_p->s_out_file, "%5d: ", getpid()); + fprintf(dbug_state_object_p->s_out_file, "%5d: ", + (int)getpid()); #endif if (dbug_state_object_p->sf_thread) - fprintf(dbug_state_object_p->s_out_file, "%5ld: ", thr_self()); + fprintf(dbug_state_object_p->s_out_file, "%5ld: ", + (long)thr_self()); if (dbug_state_object_p->sf_number) fprintf(dbug_state_object_p->s_out_file, "%5ld: ", lineno); @@ -1233,7 +1238,7 @@ delayarg(int value) */ static void -delay(u_int xx) +delay(uint_t xx) { #if (unix || xenix) sleep(xx); @@ -1242,7 +1247,7 @@ delay(u_int xx) Delay(xx); #endif #ifdef __ZTC__ - msleep((u_long)xx); + msleep((ulong_t)xx); #endif } @@ -1262,7 +1267,7 @@ delay(u_int xx) #include <sys/time.h> #include <sys/resource.h> -static u_long +static ulong_t getclock() { #if 0 @@ -1277,7 +1282,7 @@ getclock() #else -static u_long +static ulong_t getclock() { return (0); @@ -1287,7 +1292,7 @@ getclock() #endif /* unix */ #ifdef MSDOS -static u_long +static ulong_t getclock() { return (clock() * 10); @@ -1311,7 +1316,7 @@ mystrtok(char *s1, char *s2) if (s2 != NULL) { if (s1 != NULL) { end = s1; - rtnval = mystrtok((char *) NULL, s2); + rtnval = mystrtok((char *)NULL, s2); } else if (end != NULL) { if (*end != '\0') { rtnval = end; diff --git a/usr/src/cmd/fs.d/cachefs/mount/Makefile b/usr/src/cmd/fs.d/cachefs/mount/Makefile index b658111d3b..46d3689be1 100644 --- a/usr/src/cmd/fs.d/cachefs/mount/Makefile +++ b/usr/src/cmd/fs.d/cachefs/mount/Makefile @@ -22,7 +22,7 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/fs.d/cachefs/mount @@ -38,7 +38,7 @@ PROGOBJS= mount.o $(FSLIB) include ../Makefile.cachefs -CPPFLAGS += -D_LARGEFILE64_SOURCE -I../.. -o $@ +CPPFLAGS += -D_LARGEFILE64_SOURCE -I../.. LDLIBS += -lnsl -lkstat # diff --git a/usr/src/cmd/fs.d/cachefs/mount/mount.c b/usr/src/cmd/fs.d/cachefs/mount/mount.c index 2122d3b681..e495babca3 100644 --- a/usr/src/cmd/fs.d/cachefs/mount/mount.c +++ b/usr/src/cmd/fs.d/cachefs/mount/mount.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -191,6 +191,7 @@ int quiet; * Preconditions: */ +int main(int argc, char **argv) { char *myname; diff --git a/usr/src/cmd/fs.d/cachefs/umount/Makefile b/usr/src/cmd/fs.d/cachefs/umount/Makefile index 4eb47b8a08..3002f5b816 100644 --- a/usr/src/cmd/fs.d/cachefs/umount/Makefile +++ b/usr/src/cmd/fs.d/cachefs/umount/Makefile @@ -22,7 +22,7 @@ # #ident "%Z%%M% %I% %E% SMI" # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # cmd/fs.d/cachefs/umount @@ -38,7 +38,7 @@ PROGOBJS= umount.o $(FSLIB) include ../Makefile.cachefs -CPPFLAGS += -I../.. -o $@ +CPPFLAGS += -I../.. LDLIBS += -lnsl $(LIBPROG) : $(CFSLIB) |
