Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_lfs printf format fixes for Alpha.
details: https://anonhg.NetBSD.org/src/rev/43f63e11a8f0
branches: trunk
changeset: 467392:43f63e11a8f0
user: nathanw <nathanw%NetBSD.org@localhost>
date: Wed Mar 24 05:32:23 1999 +0000
description:
printf format fixes for Alpha.
diffstat:
sbin/fsck_lfs/inode.c | 4 ++--
sbin/fsck_lfs/pass0.c | 18 +++++++++++-------
sbin/fsck_lfs/pass1.c | 12 ++++++------
sbin/fsck_lfs/pass2.c | 6 +++---
sbin/fsck_lfs/setup.c | 9 +++++----
5 files changed, 27 insertions(+), 22 deletions(-)
diffs (158 lines):
diff -r 982b7f7cfce2 -r 43f63e11a8f0 sbin/fsck_lfs/inode.c
--- a/sbin/fsck_lfs/inode.c Wed Mar 24 03:52:41 1999 +0000
+++ b/sbin/fsck_lfs/inode.c Wed Mar 24 05:32:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $Id: inode.c,v 1.1 1999/03/18 02:02:19 perseant Exp $ */
+/* $Id: inode.c,v 1.2 1999/03/24 05:32:23 nathanw Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -711,7 +711,7 @@
printf("MODE=%o\n", dp->di_mode);
if (preen)
printf("%s: ", cdevname());
- printf("SIZE=%qu ", dp->di_size);
+ printf("SIZE=%qu ", (unsigned long long)dp->di_size);
t = dp->di_mtime;
p = ctime(&t);
printf("MTIME=%12.12s %4.4s ", &p[4], &p[20]);
diff -r 982b7f7cfce2 -r 43f63e11a8f0 sbin/fsck_lfs/pass0.c
--- a/sbin/fsck_lfs/pass0.c Wed Mar 24 03:52:41 1999 +0000
+++ b/sbin/fsck_lfs/pass0.c Wed Mar 24 05:32:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $Id: pass0.c,v 1.1 1999/03/18 02:02:19 perseant Exp $ */
+/* $Id: pass0.c,v 1.2 1999/03/24 05:32:23 nathanw Exp $ */
/*
* Copyright (c) 1998 Konrad E. Schroder.
* Copyright (c) 1980, 1986, 1993
@@ -139,7 +139,8 @@
/* printf("Seg at 0x%x\n",addr); */
if((flags & CKSEG_VERBOSE) && segnum*db_ssize + fs->lfs_sboffs[0] != addr)
pwarn("WARNING: segment begins at 0x%qx, should be 0x%qx\n",
- (long long unsigned)addr, segnum*db_ssize + fs->lfs_sboffs[0]);
+ (long long unsigned)addr,
+ (long long unsigned)(segnum*db_ssize + fs->lfs_sboffs[0]));
sum_offset = ((off_t)addr << dbshift);
/* If this segment should have a superblock, look for one */
@@ -183,15 +184,18 @@
if(flags & CKSEG_VERBOSE) {
/* Corrupt partial segment */
pwarn("CORRUPT PARTIAL SEGMENT %d/%d OF SEGMENT %d AT BLK 0x%qx",
- psegnum, su.su_nsums, segnum, sum_offset>>dbshift);
+ psegnum, su.su_nsums, segnum,
+ (unsigned long long)sum_offset>>dbshift);
if(db_ssize < (sum_offset>>dbshift) - addr)
pwarn(" (+0x%qx/0x%qx)",
- ((sum_offset>>dbshift) - addr) - db_ssize,
- db_ssize);
+ (unsigned long long)(((sum_offset>>dbshift) - addr) -
+ db_ssize),
+ (unsigned long long)db_ssize);
else
pwarn(" (-0x%qx/0x%qx)",
- db_ssize - ((sum_offset>>dbshift) - addr),
- db_ssize);
+ (unsigned long long)(db_ssize -
+ ((sum_offset>>dbshift) - addr)),
+ (unsigned long long)db_ssize);
pwarn("\n");
dump_segsum(sump,sum_offset>>dbshift);
}
diff -r 982b7f7cfce2 -r 43f63e11a8f0 sbin/fsck_lfs/pass1.c
--- a/sbin/fsck_lfs/pass1.c Wed Mar 24 03:52:41 1999 +0000
+++ b/sbin/fsck_lfs/pass1.c Wed Mar 24 05:32:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $Id: pass1.c,v 1.1 1999/03/18 02:02:19 perseant Exp $ */
+/* $Id: pass1.c,v 1.2 1999/03/24 05:32:23 nathanw Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -124,8 +124,8 @@
inphead = (struct inoinfo **)calloc((unsigned)numdirs,
sizeof(struct inoinfo *));
if (inpsort == NULL || inphead == NULL) {
- printf("cannot alloc %u bytes for inphead\n",
- (unsigned)numdirs * sizeof(struct inoinfo *));
+ printf("cannot alloc %lu bytes for inphead\n",
+ (unsigned long)numdirs * sizeof(struct inoinfo *));
exit(1);
}
@@ -190,7 +190,7 @@
if (/* dp->di_size < 0 || */
dp->di_size + sblock.lfs_bsize - 1 < dp->di_size) {
if (debug)
- printf("bad size %qu:", dp->di_size);
+ printf("bad size %qu:", (unsigned long long)dp->di_size);
goto unknown;
}
if (!preen && mode == IFMT && reply("HOLD BAD BLOCK") == 1) {
@@ -203,7 +203,7 @@
if (ndb < 0) {
if (debug)
printf("bad size %qu ndb %d:",
- dp->di_size, ndb);
+ (unsigned long long)dp->di_size, ndb);
goto unknown;
}
if (mode == IFBLK || mode == IFCHR)
@@ -227,7 +227,7 @@
if (debug) {
symbuf[dp->di_size] = 0;
printf("convert symlink %d(%s) of size %qd\n",
- inumber, symbuf, dp->di_size);
+ inumber, symbuf, (long long)dp->di_size);
}
dp = ginode(inumber);
memcpy(dp->di_shortlink, symbuf, (long)dp->di_size);
diff -r 982b7f7cfce2 -r 43f63e11a8f0 sbin/fsck_lfs/pass2.c
--- a/sbin/fsck_lfs/pass2.c Wed Mar 24 03:52:41 1999 +0000
+++ b/sbin/fsck_lfs/pass2.c Wed Mar 24 05:32:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $Id: pass2.c,v 1.1 1999/03/18 02:02:19 perseant Exp $ */
+/* $Id: pass2.c,v 1.2 1999/03/24 05:32:23 nathanw Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -137,8 +137,8 @@
}
} else if ((inp->i_isize & (DIRBLKSIZ - 1)) != 0) {
getpathname(pathbuf, inp->i_number, inp->i_number);
- pwarn("DIRECTORY %s: LENGTH %d NOT MULTIPLE OF %d",
- pathbuf, inp->i_isize, DIRBLKSIZ);
+ pwarn("DIRECTORY %s: LENGTH %lu NOT MULTIPLE OF %d",
+ pathbuf, (unsigned long)inp->i_isize, DIRBLKSIZ);
if (preen)
printf(" (ADJUSTED)\n");
inp->i_isize = roundup(inp->i_isize, DIRBLKSIZ);
diff -r 982b7f7cfce2 -r 43f63e11a8f0 sbin/fsck_lfs/setup.c
--- a/sbin/fsck_lfs/setup.c Wed Mar 24 03:52:41 1999 +0000
+++ b/sbin/fsck_lfs/setup.c Wed Mar 24 05:32:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $Id: setup.c,v 1.1 1999/03/18 02:02:19 perseant Exp $ */
+/* $Id: setup.c,v 1.2 1999/03/24 05:32:23 nathanw Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -310,7 +310,8 @@
#endif
if (sblock.lfs_maxfilesize != maxfilesize) {
pwarn("INCORRECT MAXFILESIZE=%qu IN SUPERBLOCK (should be %qu)",
- sblock.lfs_maxfilesize, maxfilesize);
+ (unsigned long long)sblock.lfs_maxfilesize,
+ (unsigned long long)maxfilesize);
sblock.lfs_maxfilesize = maxfilesize;
if (preen)
printf(" (FIXED)\n");
@@ -362,8 +363,8 @@
}
lncntp = (int16_t *)calloc((unsigned)(maxino + 1), sizeof(int16_t));
if (lncntp == NULL) {
- printf("cannot alloc %u bytes for lncntp\n",
- (unsigned)(maxino + 1) * sizeof(int16_t));
+ printf("cannot alloc %lu bytes for lncntp\n",
+ (unsigned long)(maxino + 1) * sizeof(int16_t));
goto badsblabel;
}
bufinit();
Home |
Main Index |
Thread Index |
Old Index