Source-Changes-HG archive

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

[src/trunk]: src/sbin/newfs_v7fs Fix warning message.



details:   https://anonhg.NetBSD.org/src/rev/94ea6e79e2bb
branches:  trunk
changeset: 768129:94ea6e79e2bb
user:      uch <uch%NetBSD.org@localhost>
date:      Tue Aug 09 11:18:28 2011 +0000

description:
Fix warning message.

diffstat:

 sbin/newfs_v7fs/main.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 2f7c1b4b2975 -r 94ea6e79e2bb sbin/newfs_v7fs/main.c
--- a/sbin/newfs_v7fs/main.c    Tue Aug 09 11:12:02 2011 +0000
+++ b/sbin/newfs_v7fs/main.c    Tue Aug 09 11:18:28 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.8 2011/08/09 09:12:07 uch Exp $     */
+/*     $NetBSD: main.c,v 1.9 2011/08/09 11:18:28 uch Exp $     */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.8 2011/08/09 09:12:07 uch Exp $");
+__RCSID("$NetBSD: main.c,v 1.9 2011/08/09 11:18:28 uch Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -78,7 +78,10 @@
        int error;
 
        if ((error = v7fs_superblock_load(fs))) {
-               warnx("Can't read superblock sector.");
+               if (error != EINVAL) {
+                       /* Invalid superblock information is OK. */
+                       warnx("Can't read superblock sector.");
+               }
        }
        sb->modified = 1;
        if ((error = v7fs_superblock_writeback(fs))) {



Home | Main Index | Thread Index | Old Index