Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sbin/fsck_msdos Pull up revision 1.12 (via patch, reque...



details:   https://anonhg.NetBSD.org/src/rev/e9a91a077ae3
branches:  netbsd-1-4
changeset: 470977:e9a91a077ae3
user:      he <he%NetBSD.org@localhost>
date:      Tue Oct 10 22:22:41 2000 +0000

description:
Pull up revision 1.12 (via patch, requested by is):
  Format string cleanup.

diffstat:

 sbin/fsck_msdos/fat.c |  21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diffs (51 lines):

diff -r de94796f0b0d -r e9a91a077ae3 sbin/fsck_msdos/fat.c
--- a/sbin/fsck_msdos/fat.c     Tue Oct 10 21:51:19 2000 +0000
+++ b/sbin/fsck_msdos/fat.c     Tue Oct 10 22:22:41 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fat.c,v 1.9 1998/01/22 18:48:44 ws Exp $       */
+/*     $NetBSD: fat.c,v 1.9.2.1 2000/10/10 22:22:41 he Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fat.c,v 1.9 1998/01/22 18:48:44 ws Exp $");
+__RCSID("$NetBSD: fat.c,v 1.9.2.1 2000/10/10 22:22:41 he Exp $");
 #endif /* not lint */
 
 #include <stdlib.h>
@@ -139,22 +139,25 @@
                && ((buffer[3]&0x0f) != 0x0f
                    || buffer[4] != 0xff || buffer[5] != 0xff
                    || buffer[6] != 0xff || (buffer[7]&0x0f) != 0x0f))) {
-               char *msg;
 
                switch (boot->ClustMask) {
                case CLUST32_MASK:
-                       msg = "FAT starts with odd byte sequence (%02x%02x%02x%02x%02x%02x%02x%02x)\n";
+                       pwarn("%s (%02x%02x%02x%02x%02x%02x%02x%02x)\n",
+                             "FAT starts with odd byte sequence",
+                             buffer[0], buffer[1], buffer[2], buffer[3],
+                             buffer[4], buffer[5], buffer[6], buffer[7]);
                        break;
                case CLUST16_MASK:
-                       msg = "FAT starts with odd byte sequence (%02x%02x%02x%02x)\n";
+                       pwarn("%s (%02x%02x%02x%02x)\n",
+                             "FAT starts with odd byte sequence",
+                             buffer[0], buffer[1]. buffer[2], buffer[3]);
                        break;
                default:
-                       msg = "FAT starts with odd byte sequence (%02x%02x%02x)\n";
+                       pwarn("%s (%02x%02x%02x)\n",
+                             "FAT starts with odd byte sequence",
+                             buffer[0], buffer[1], buffer[2]);
                        break;
                }
-               pwarn(msg,
-                     buffer[0], buffer[1], buffer[2], buffer[3],
-                     buffer[4], buffer[5], buffer[6], buffer[7]);
                if (ask(1, "Correct"))
                        ret |= FSFATMOD;
        }



Home | Main Index | Thread Index | Old Index