From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 2 00:10:17 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6010816A4BF for ; Tue, 2 Sep 2003 00:10:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3DA943FF7 for ; Tue, 2 Sep 2003 00:10:16 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h827AGUp078126 for ; Tue, 2 Sep 2003 00:10:16 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h827AGGw078125; Tue, 2 Sep 2003 00:10:16 -0700 (PDT) Date: Tue, 2 Sep 2003 00:10:16 -0700 (PDT) Message-Id: <200309020710.h827AGGw078125@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Jason Young" Subject: Re: bin/46672: dump(8) program gives unnecessary -L warning X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jason Young List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 07:10:17 -0000 The following reply was made to PR bin/46672; it has been noted by GNATS. From: "Jason Young" To: freebsd-gnats-submit@FreeBSD.org, swear@attbi.com Cc: Subject: Re: bin/46672: dump(8) program gives unnecessary -L warning Date: Tue, 02 Sep 2003 02:07:09 -0500 Here is a patch to dump(8) that eliminates the warning for filesystems mounted readonly, and modifies the warning to include only read-write filesystems. *** main.c.orig Tue Sep 2 01:26:49 2003 --- main.c Tue Sep 2 01:59:09 2003 *************** *** 311,324 **** } spcl.c_dev[NAMELEN-1]='\0'; spcl.c_filesys[NAMELEN-1]='\0'; if ((mntpt = getmntpt(disk, &mntflags)) != 0) { ! if (snapdump == 0) { ! msg("WARNING: %s\n", ! "should use -L when dumping live filesystems!"); ! } else { struct ufs_args args; char snapname[BUFSIZ]; snprintf(snapname, sizeof snapname, "%s/.dump_snapshot", mntpt); --- 311,321 ---- } spcl.c_dev[NAMELEN-1]='\0'; spcl.c_filesys[NAMELEN-1]='\0'; if ((mntpt = getmntpt(disk, &mntflags)) != 0) { ! if (snapdump == 1) { struct ufs_args args; char snapname[BUFSIZ]; snprintf(snapname, sizeof snapname, "%s/.dump_snapshot", mntpt); *************** *** 338,347 **** --- 335,347 ---- } unlink(snapname); if (fstat(diskfd, &sb) != 0) err(X_STARTUP, "%s: stat", snapname); spcl.c_date = _time_to_time64(sb.st_mtime); + } else if(!(mntflags & MNT_RDONLY)) { + msg("WARNING: %s\n", + "should use -L when dumping live r/w filesystems!"); } } else if (snapdump != 0) { msg("WARNING: Cannot use -L on an unmounted filesystem.\n"); snapdump = 0; } _________________________________________________________________ Get MSN 8 and enjoy automatic e-mail virus protection. http://join.msn.com/?page=features/virus