From owner-freebsd-bugs@FreeBSD.ORG Sat Jun 11 15:30:27 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 2C6E116A41C for ; Sat, 11 Jun 2005 15:30:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5627D43D76 for ; Sat, 11 Jun 2005 15:30:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j5BFUKAt052331 for ; Sat, 11 Jun 2005 15:30:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j5BFUKWY052330; Sat, 11 Jun 2005 15:30:20 GMT (envelope-from gnats) Date: Sat, 11 Jun 2005 15:30:20 GMT Message-Id: <200506111530.j5BFUKWY052330@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Matteo Riondato Cc: Subject: Re:bin/75585: [unionfs] mount -p on unionfs results in non parsable fstab file X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matteo Riondato List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2005 15:30:27 -0000 The following reply was made to PR bin/75585; it has been noted by GNATS. From: Matteo Riondato To: bug-followup@FreeBSD.org, dirkx@webweaving.org Cc: Subject: Re:bin/75585: [unionfs] mount -p on unionfs results in non parsable fstab file Date: Sat, 11 Jun 2005 17:21:09 +0200 Patch for this (can be found at http://www.riondabsd.net/diff/mount.diff ): --- mount.c.old Sat Jun 11 14:22:44 2005 +++ mount.c Sat Jun 11 14:31:17 2005 @@ -80,7 +80,7 @@ int, const char *, const char *); void remopt(char *, const char *); void prmount(struct statfs *); -void putfsent(const struct statfs *); +void putfsent(struct statfs *); void usage(void); char *flags2opts(int); @@ -714,12 +714,17 @@ void putfsent(ent) - const struct statfs *ent; + struct statfs *ent; { struct fstab *fst; char *opts; opts = flags2opts(ent->f_flags); + if (strncmp(ent->f_mntfromname, "", 7) == 0 || + strncmp(ent->f_mntfromname, "", 7) == 0) { + strcpy(ent->f_mntfromname, + (strnstr(ent->f_mntfromname, ":", 8) +1)); + } printf("%s\t%s\t%s %s", ent->f_mntfromname, ent->f_mntonname, ent->f_fstypename, opts); free(opts); Best Regards -- Rionda aka Matteo Riondato G.U.F.I. Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org)